Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
fabdulazeez
Partner - Creator III
Partner - Creator III

How to handle Variable reset on Qlik Sense reload.

We have embed our Qlik sense visualization in our in house application using QDT. Users are allowed to control visualization and column displayed using variables. Now we are facing the issue that every time the app is reloaded from tasks (which happens every 5 minute) the variable selection from the user is reset and everything is re calculated. This is very annoying. Please let me know what is the best way to handle this.

@Yianni_Ververis ,

Sorry I know this is not related to QDT , bt can you provide some suggestion as how you handle this in Qlik Demo Apps.

Thanks & Regards

Fawaz 

Labels (1)
5 Replies
Yianni_Ververis
Employee
Employee

I believe this is due to anon connection. When you connect its always a new session and it is never saved. try authenticated user for win or if you are using it with Saas from a space that user can edit, then it should work just fine

fabdulazeez
Partner - Creator III
Partner - Creator III
Author

Thanks @Yianni_Ververis ,

We are using authenticated user in Qlik sense Enterprise windows edition. The behavior is not specific to embed solution. Even in Qlik if we are using variable input the value of variable is reset on reload.

In embed solution we are receiving the value from end user and using capabilityApi.variable.setStringValue  to set its value in Qlik. When the reload happens on Qlik side the variable value is reset, which results in data displayed not as per user input.

stevejoyce
Specialist II
Specialist II

If you remove initializing variable in load script does that resolve your issue?  Comment out user input variables, or put them in an if-statement block that you can control with a script variable so you only create/reset to default values during app development, daily, etc.

fabdulazeez
Partner - Creator III
Partner - Creator III
Author

The variable is created from variables overview and not in the script. I will try if creating variable in the script will help.

fabdulazeez
Partner - Creator III
Partner - Creator III
Author

Using script variable is not working, when the script variable is not created or reset during reload, it behaves same as variable created in variable overview and will have it's value when the app is published  as the default value.