Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Strange behaviour of variables

I use a script which creates variables.

Their values are set within IF-clauses.

I load the script and then they work fine in the app-view, but when I restart my browser their values are different

(The values are from different if-clause outcomes).

Why do their value change when I restart my browser?

I thought their values are bound to the last value they received, from the variable editor or the data load script.

Do I need to store all variables in tables and reload them as a workaround or is there a better solution?

12 Replies
Anonymous
Not applicable
Author

I think the problem is linked to script variables and custom variables.

All of my old variables are displayed as custom variables, immune to script-changes but changeable by the variable-editor.

Newly created variables are displayed as script variables, can't be changed by the variable-editor but in the skript.

I just don't know why the skript-variables that I have a long time now don't count as script-variables anymore.

If I open the app-view after loading in a new tab, those old variables are detected as script variables, otherwise as custom variables.

BUG from Qlik-Sense?

I can't explain why using the gui in different ways can show me the variables with their new script value or with their old "custom" value (they were never created as custom variables)

Anonymous
Not applicable
Author

I will use a save and load as fields - workaround, but it would be nice to know whether this is a general or specific problem.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I'm not too familiar with variable behavior in Qlik Sense... yet

I certainly can't come up with a reason why your Sense client seems to change variable values at random (opening/closing a browser).

The behavior of script variables vs "custom" variables (those defined in the user interface) however seems to hint at similar behavior in recent versions of QlikView though. For example, we did run tests and noticed that in QV you can delete script variables that were created before in the same script run. A later script run however doesn't allow you to remove them anymore, although they're still script variables ...