Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 mgranillo
		
			mgranillo
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can someone tell me what's wrong with my code?
I'm trying to communicate with the desktop engine using the opendoc method and the browser.
The getdoclist method works so i have a working connection. I just don't know why i dont get a result for the OpenDoc method.
<!doctype html>
<!-- <html> -->
<html>
<head>
<script src="https://rawgit.com/mindspank/qsocks/master/qsocks.bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.js"></script>
<script>
function connect() {
qsocks.Connect().then(global => {
global.getDocList().then(function(documents) {
var available_docs = [];
documents.forEach(function(document_entry){
available_docs.push(document_entry.qDocId);
});
console.log(available_docs);
});
global.OpenDoc("H:\My Documents\Qlik\Sense\Apps\Consumer_Sales.qvf").then(function(app) {
app.GetAllInfos().then(function(appInfos){
var measures_list = [];
appInfos.qInfos.forEach(function(document_infos){
if(document_infos.qType=='measures'){
measures_list.push(document_infos.qId)
}
});
console.log(measures_list.length());
});
});
});
}
connect();
</script>
<body></body>
</script>
</head>
<body>
</body></html>
 
					
				
		
Has this problem been resolved? I cannot open a local app with openDoc().
 
					
				
		
 Alexander_Thor
		
			Alexander_Thor
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		qsocks has been deprecated for quite a while now. I would recommend you check out https://github.com/qlik-oss/enigma.js which is a much better alternative.
