Qlik Community

Qlik Sense Integration, Extensions, & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

Re: Qlik Sense: app.variable.getContent() doesn't return the current variable value

Hi,

Instead of calling getContent I made a function called getContent ^^.

The only thing it does is creating a table with one dummy dimension and one measure (the variable).

It places the value in an array.

function getContent() {

app.createCube({

  "qDimensions": [{

    "qDef": {

      "qFieldDefs" : ["Dummy"]

  }

  }],

  "qMeasures": [{

    "qDef": {

      "qDef": "=$(vVariable)",

      "qLabel": "Variable"

  }

  }],

  "qInitialDataFetch": [{

    qHeight:1,

    qWidth: 2

  }]

}, function(reply) {

 

$.each(reply.qHyperCube.qDataPages[0].qMatrix, function(index, value) {


var valueArrayText = [];

        valueArrayText = this[1].qText;

        //Do something with the valueArrayText  


});


});


}

View solution in original post

Highlighted
Contributor
Contributor

Re: Qlik Sense: app.variable.getContent() doesn't return the current variable value

Thank you very much, Filip!

Highlighted
Creator II
Creator II

Re: Qlik Sense: app.variable.getContent() doesn't return the current variable value

Hi, Filip

I have a similar issue and tried your getContent() method, but still not working.

Below is the link of my posted thread, could you help me where I am doing wrong?

https://community.qlik.com/t5/New-to-Qlik-Sense/How-to-get-Variable-value-when-building-the-mashup/m...

Thx in advance.

ZZ