Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I am faced with a problem that even after hours I could not solve:
In an extension I am calling this function:
switchStatus: function (id, varName, ValueOn, ValueOff ){
var app = qlik.currApp();
if($('#toggle'+ id).prop("checked")){
app.variable.setStringValue(varName, ValueOn).then(function() {
var app2 = qlik.currApp();
app2.variable.getContent(varName, function(reply){
console.log(reply) // Always the initial value of the variable
})
});
}
}
I am changing the value of the variable via
app.variable.setStringValue(varName, ValueOn);
I can see the change omthe GUI, however when trying to get the new value of the variable via
app2.variable.getContent(varName, function(reply).....
the result is always the initial value of the variable.
What am I doing wrong?
Any luck with this one I am facing the same issue.
I am using the getContent and SetStringValue to get and set the value of variables.
SetStringValue changes the value, however the getContent does not update on the next iteration