Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Experts
I am trying to set the variable value in my extension using Sense Variable API call. IT was working perfectly before.
I was using the following code snippet. Now it creates the variable, but no value is being set.
qlik.currApp().variable.getByName(variableName).then(function(model) {
if (isNaN(variableValue)) {
qlik.currApp().variable.setStringValue(variableName, variableValue);
} else {
var num = parseFloat(variableValue);
qlik.currApp().variable.setNumValue(variableName, num);
}
}, function(errorObject) {
qlik.currApp().variable.create(variableName).then(function(model) {
if (isNaN(variableValue)) {
qlik.currApp().variable.setStringValue(variableName, variableValue);
} else {
var num = parseFloat(variableValue);
qlik.currApp().variable.setNumValue(variableName, num);
}
})
});
Thanks
Actually, the variable is being set, I can see it by adding the text box to the sheet, but when I look through Variables dialog - no value is there. Is this ok?
Actually, the variable is being set, I can see it by adding the text box to the sheet, but when I look through Variables dialog - no value is there. Is this ok?
Hello Darius,
Yes like you said, the variable is being set but it is not showing up in the Variables dialog in the client.
And it has always been like this, we will investigate it