Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
From within an extension, I try setting a variable. But the variable is casing the whole extension to reload, and run the Qva.AddExtension() again... and again... and again...
The extension is fetching a value form a database; upon load, and on certain user actions. I need to transfer this value back to the QlikView document. And the plan was to set a variable.
this.setAccountVariable = function(accountNumber)
{
var variableName = _self.qlikViewPage.Layout.Text0.text;
var doc = Qv.GetCurrentDocument();
doc.SetVariable(variableName, accountNumber); // If I comment this line, it "works"
}
As long as the SetVariable() is there, the extension keeps reloading forever.
If I comment that line, the extension "works", except of course, it doesn't set the variable that I need it to set.
Any suggestions to how to get out of this problem, please?
For information:
I did not find a solution to this. And ended up redesigning the solution, so that I don't need to set a variable from the extension.
IF someone knows the answer on how to do this, I would still like to know how. Because I can see the potential need for setting a variable from an extension arise again. Without necessarily having to trigger a reload of the extension.
Cheers,
Vegard
We are also facing the same issue.
Can you please advice which alternative solution you have designed. Any hint would be helpful. Thanks.
if ( window.treeData==undefined){
var treeData = DATA.children[0]
window.treeData=treeData
***
some code
***
}