Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
D_BrUuu
Contributor
Contributor

Enigma : get variable

Hello 
I would like to get objects from my application. and enigma doesn't seem to work.

The application is on my Desktop, created with QlikSense Desktop which is open when I run the belo js

There is for sure an error in my code:

const enigma = require('enigma.js');
const WebSocket = require('ws');
const schema = require('./node_modules/enigma.js/schemas/12.1477.0.json');

const url = 'ws://localhost:9076/app/engineData';

const session = enigma.create({
schema,
url,
createSocket: url => new WebSocket(url),
});

session.open().then(async (global) => {
const app = await global.openDoc('MyDoc.qvf');

const variables = await app.getVariables({"qListDef":{"qName": "CIRO"}});
console.log('Variables:', variables);

if(session!=null) session.close();
}).catch((err) => {
console.log('Error:', err);
});

 

 

The app is really a stupid one:

here's the script

LET PIRO=1;
SET CIRO=2;


DATA1:
LOAD * INLINE [...
];

 

Labels (4)
0 Replies