Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
patricem
Contributor
Contributor

Variable Input Extension default value

Hi all,

I'm using version 6.9.0 of the Variable Input Extension. I am using to choose timeframes to show the data in the app over a selected period. 

The extension works fine once an option is selected, however, before selecting, all charts show ''The chart is not displayed because it contains only undefined values''.  

How do I set, say, the first button as the default option so the values are always defined?

Any help is greatly appreciated!

Patrice

@ErikWetterberg 

VariableInputNotSelected.JPG

 

Labels (1)
1 Solution

Accepted Solutions
carlos_molino
Contributor III
Contributor III

As the colleagues comment, you should assign a value to the variable in the script (which is my recommendation) with something similar to the following form

set variable_name = 'CurrentMonth';

With this, when you load the app, by default you will have that value preloaded until you modify it in the Variable Input.

I recommend that you always load a default value in all variables.

Hope this can help you.

View solution in original post

4 Replies
Mark_Little
Luminary
Luminary

Hi @patricem 

I do not have the extension to test, but i would assume that it is based of the Variable value.

If you create the Variable in script with the default you want i think it should work for you.

 

ajaykakkar93
Specialist III
Specialist III

hi,

just create the variable & add the value 

example

=1

add equalto it is mandatory 

i hope it helps

thank you

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

carlos_molino
Contributor III
Contributor III

As the colleagues comment, you should assign a value to the variable in the script (which is my recommendation) with something similar to the following form

set variable_name = 'CurrentMonth';

With this, when you load the app, by default you will have that value preloaded until you modify it in the Variable Input.

I recommend that you always load a default value in all variables.

Hope this can help you.

patricem
Contributor
Contributor
Author

Thanks all for the responses! (Just returning now to this task).

I redefined the variable in the load script with what was suggested here:

Set vSelectTimeframe = 'Current Month'

I then replaced my old variables with this new one. 

Thanks again!