Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
hugmarcel
Specialist
Specialist

Set input variable default value depending on Field.

Hi

I have an input variable X with possible values 'EN' and 'DE'. User shall have to select a value.

Now if field USER.CORRESPONDANCE_LANGUAGE is DE, X should be 'DE' by default. Still, the user shall have the possibility to select 'EN' instead, or switch between both values in the input box.

How is this possible?

Thx - Marcel

2 Replies
m_woolf
Master II
Master II

If you are using IE and the plugin, you can assign the default variable value in the Document|OnOpen trigger.

You could still have an Input Box allowing the user to select values.

felipedl
Partner - Specialist III
Partner - Specialist III

Hi Marcel,

How do you get the USER.CORRESPONDANCE_LANGUAGE field equal to DE?

You can use a trigger on the post reload to get the value from the variable and select it on your data model once the reload is done.

I used the following code to get to the selection:

set USER.CORRESPONDANCE_LANGUAGE=DE;

load * Inline

[

Lang

DE

EN

PT

];

sample.png