Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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
sunny_talwar

Do you have On-Open trigger which might cause the value of the variable to change for some reason?

Anonymous
Not applicable
Author

Not that i would know - I am basically just loading and opening the app / closing browser and opening again

sunny_talwar

Are you able to save a copy of the dashboard and check if there is any on-open trigger?

Anonymous
Not applicable
Author

I don't think I have the permissions to see or set triggers.

Is there a kind of trigger preventing variables to be saved?

sunny_talwar

I think it might be saved to one value, but there might be a trigger which changes it's value as soon as your reopen the dashboard.

Anonymous
Not applicable
Author

It may be trivial but I noticed that the variables also reset when I don't open the app-view in a new tab but inside the data load editor-window.

Anonymous
Not applicable
Author

I noticed something less trivial:

scenario:

     var1 = true;

     var2 does not yet exist

script:

     LET var1 = FALSE();    

     LET var2 = FALSE();

after load:

     var1 = true;

     var2 = false;

The important thing is, that var2 is noticed as being loaded from the script, while var1 is not

Anonymous
Not applicable
Author

New variables can be changed as I wish and keep their values,

old variables (past days) won't change.

I am working on a server - I guess this is linked to the main problem?

sunny_talwar

Not sure, may be pcammaert‌ can offer his expert advice here