Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Multiselection value from variable

I have question regarding multiple selection in Qlikview 11.

How do I set multiple values in listbox from a variable?

6 Replies
Gysbert_Wassenaar

Use a Select in Field action (on a button or text object) and use the variable as search string. Your variable needs to have the form (val1|val2|...|valn). The values need to be separated by a pipe symbol and enclosed in parentheses.


talk is cheap, supply exceeds demand
Not applicable
Author

Many thanks for your replay.

I have done exactly same but it not selecting values in listbox...(I mean there is no selection happen in Listbox)

for example :

vTest = British Airways|CAMP British Airways

Creted action on Button - Select in Field - (Field : Agreement)  (Search String: =vTest)

Do you have any example file?

Gysbert_Wassenaar

Your vTest variable is missing the surrounding paretheses. And since your values have spaces in them they need to be enclosed in double quotes:

vTest = ("British Airways"|"CAMP British Airways")


talk is cheap, supply exceeds demand
Not applicable
Author

Yeh!   it is working fine....

thanks

mbandham
Contributor
Contributor

@Gysbert_Wassenaar  Hi, In my case, the value in my variable looks like this.

"(British Airways|CAMP British Airways)"

Is there any way, I make it work.?

marcus_sommer

Each search-string which contains a space or a special chars needs to be wrapped with double-quotes. Just take a closely look on the example above.

- Marcus