Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am having problems trying to get the values of some expressions I am running the code below: I am able to open the document but do not get the string i am trying to print out.. it remains all blank , can´t understand why?
qsocks.Connect().then(global => {
console.log("****** Connection Open ******");
return global.openDoc('Sales Discovery.qvf');
}).then(app => {
console.log("****** Document Open ******", app);
app.createGenericObject( {
user: {
qStringExpression: "=QVUser ()"
},
version : {
qStringExpression: "=QlikViewVersion ()"
},
fields: {
qValueExpression: "=Count (DISTINCT $Field)"
}
}, function ( reply ) {
var str = "Version:" + reply.version + " Fields:" + reply.fields;
if ( reply.user ) {
str += " User:" + reply.user;
}
console.log(str);
});
})
Basically, what I would like to see is the outcome of this last line console.log(str)
It looks like it ain´t even creating the generic object