Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
ali_hijazi
Partner - Master II
Partner - Master II

select in field multiple values of variables

Dear

I got 2 variables assigned by 2 sliders

I want to select in Field Year the 2 values of the above variables

I'm writing the following syntax in the OnInput trigger of the 2 variables:

the action is Select In Field

in the value I'm writing ($(vYear1)|($(vYear2))

Yet I'm not getting any selection

However If I hard code as follows (2008|2009) I'm getting the right selection

Please advise

I can walk on water when it freezes
3 Replies
danielrozental
Master II
Master II

Try something like

='(' & $(vYear1) & '|' & $(vYear2) & ')'

Not applicable

it worked

jerrydimaso
Partner - Contributor II
Partner - Contributor II

For all who might be using this without also using Dollar Sign Expansion for your variables (i.e. if you're having the user choose two values in one field from an input box dropdown) and if the values in the fields are not all one word , you must add double quotes for this to work:

='(' & ' " ' & vYear1 & ' " ' &'|' & ' " ' & vYear2 & ' " ' & ')'

This is for fields with values containing multiple words.

Just something I came across while fiddling to save you the time