Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to write a simple extension in the paint section of my extension.
I am creating an input box and in the onchange event I want to call a function and send the qlik object I guess so I can get the current app inside the function, or send the reference to the current app. Is there a way to do that. Here is what I got
I tried sending the variable a and it doesn't work.
paint: function ($element) {
//add your rendering code here
//var app = qlik.openApp('5b984685-4ba7-4e0a-8552-e36f02626a62', config);
//GenericVariable GetVariableByName([QixName("qName")] vtest)
var qApp = qlik.currApp(this);
qApp.variable.getContent('jtest').then(function(reply){
console.log(JSON.stringify( reply ) )
});
qApp.variable.setStringValue('jtest','changed').then(
console.log("setvalue"));
qApp.variable.getContent('jtest').then(function(reply){
console.log(JSON.stringify( reply ) )
});
var a = 1;
var test = '<label class="lui-label">Janet Test</label><input type="date" id="DateInput" style="width:140px;" onchange="myFunction(a)">'
$element.empty();
$element.append(test);
//needed for export
return qlik.Promise.resolve();
}
};
Hi @JShum , are you trying to read input box value when onchange event is triggered and then use it for setting Qlik Sense variable value?