Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
jsjohann
Contributor
Contributor

Default values of variables which resets on load

Hello there,

is it possible to define default values based on a function for variables which resets to this default value every time the dashboard is opened? 

I've tried setting the definition in the variable overview to this particular function but this function gets ignored or overwritten when I set the variable over a dropdown field. 

My plan is do use a dropdown field to set a time period and change the data accordingly. For this use case it is important that the default selected value is the newest period.

Thanks for your help

3 Replies
rubenmarin

Hi @jsjohann, in Configuration -> document properties -> triggers you can set anaction when the qvw opens, using an action External -> Set variable you can assign the variable value each time the document is opened.

Brakusco
Contributor
Contributor

Have you tried setting them in your Awake () or Start () function? Or are you trying to avoid hardcoding them in a script? You could always make a serializeable field and then lite blue set them to that field's value at load. There may be a cleaner way, but that will likely get it done. Hope that helps!

jsjohann
Contributor
Contributor
Author

@rubenmarin @Brakusco Thanks for your answers! I've just realized that I've posted into the wrong forum. I need help for Qlik Sense and not Qlik View.