Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I've created an extension and I need to create or update custom variable value depending some conditions.
I put a script to create variable and works fine. But when variable already created I need to update it. With this script:
var qApp = qlik.currApp(this);
qApp.variable.setStringValue('AA','test');
variable is updated when put in text object for example....but not in variable editor (nor when I refresh app) !!!!
Do you have any idea please ?
Regards
Hi,
it will not done by using capability API
you have to use Enigne API
1. use getVariableId() or getVariableName()
"params": {
"qId": "your variable id" or "qName":"your variable name"
}
2. use setProperties() and pass this jason
{
"handle": 2,
"method": "SetProperties",
"params": {
"qProp": {
"qInfo": {
"qId": "",
"qType": ""
},
"qMetaDef": {},
"qName": "",
"qComment": "",
"qNumberPresentation": {
"qType": 0,
"qnDec": 0,
"qUseThou": 0,
"qFmt": "",
"qDec": "",
"qThou": ""
},
"qIncludeInBookmark": false,
"qDefinition": " " //here you can set variable value
}
}
}