Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to get variable value in mashup.But still failed.
alert : always object object.
I refer to the help :
Anything wrong?
My variable vChange =1,so I want to get 1.
Thanks.
If you look at the documentation you refer to, you notice it is returninger a promise, and not a string.
"Returns a promise of a variable model."
Searched a bit for you and found this one... maybe it'll help you:
Qlik Sense: app.variable.getContent() doesn't return the current variable value
Or this one
A little later but if anyone need, just change alert to console.log or run this for understand :
app.variable.getContent('vChange',function ( reply ){
alert(reply); // returns [ Object Object ]
alert(reply.qContent.qString) // returns your variable
console.log(reply) // returns object in console (F12)
)};