Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Problems trying to get value of expressions via javascript ( Node.js).

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?

const qsocks = require('qsocks');


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)

1 Reply
Anonymous
Not applicable
Author

It looks like it ain´t even creating the generic object