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

Using 'Select in field' action for multiple selections

Hi,

I am using sheet actions to pre-select some fields on a particular sheet when the user opens it.

This works fine when I want to make a single selection (e.g. Field=Colour, Search String = 'Yellow').

error loading image

However I can't figure out how to make multiple selections in the same field (something like Search String = 'Yellow','Blue'). The help manual clearly indicates this should be possible:

Select in Field: "Selects the values and fields that are specified. In the Search String you can specify a search mask, e.g. (A|B) will select both A and B."

I can't for the life of me figure out how to write this, I can't seem to get the syntax right. I have tried all of the following:

='Yellow','Blue'

=Yellow,Blue

=('Yellow','Blue')

=('Yellow'|'Blue')

=('Yellow'&'Blue')

=('Yellow' and 'Blue')

Anyone got this to work? Other threads raise this question but the only answers seem to be 'use a macro' (http://community.qlik.com/forums/p/23382/89368.aspx#89368). I'd rather not use macros jsut for this as I have not used macros so far, and would be good to keep consistent.

Thanks!

20 Replies
tanelry
Partner - Creator II
Partner - Creator II

In QV10 you can use double quotes ("A B"|"C D").
But not in QV9 though. Use bookmark.

Not applicable
Author

Hi,

It seems to be common problem for QlikView developers. I tried all alternative solutions mentioned above.But unfortunately I could not achive selecting two values.

Fist of all I am using V9.

In my case I am trying to select multiple values of a time dimension. the values are assigned to two different varaibles. $Var1 and $Var2

In "Select in Field" box I have tried If I use only one varaible like ($Var1) it works. But I could nort find a way to select two.

I guess the reason is the date format of the field.

Does any one has an idea?

Best regards

Not applicable
Author

I just love this forum - thank you guys for all the help 🙂

Anonymous
Not applicable
Author

If you have spaces then Tanel's solution for QV10 works well. This also works in QV11. Use double quotes.

"In QV10 you can use double quotes ("A B"|"C D")...".

Not applicable
Author

Hi Anthony,

You can give select in field for the string 'QA' first and then give select excluded for the same field which results in selecting all values other than 'QA'.

I hope this helps

durgabhavani
Creator III
Creator III

Help me to get display the result based on the select in field value. suppose my field contains yellow red orange, if i click on yellow i need to get yellow result, if i click on red i need to get only red value.

Please help me.

jrdunson
Creator
Creator

Seems to work, when I do two values (A|B), but not three or four! Any suggestions?

It won't work with:  (A|B|C|D)

jafari_ervin
Creator III
Creator III

using double quotes like this

( "a b c" | "d e f" | "g h i ")

Anonymous
Not applicable
Author

Can someone in here perhaps help me with this thread?

Need to select a set of values in a list box, using a button action.

Anonymous
Not applicable
Author

Below expression will work even for more than two values(Tried and tested)

in my case I wanted to select values like 'Level 0' ,'Level 1' ,'Level 2' from Level field ,

so if you want to select multiple values say Level 0 and Level 1 your o/p should be shown like this


("Level 0"|"Level 1")


to show o/p like use below expression

='('&' " '&Concat(distinct Level,'"|"')&' " '&')'

You can apply above expression as per your requirement ,and this will work smoothly.