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: 
BlondeThursday
Contributor III
Contributor III

Return multiple GetFieldSelections selections parsed

I need to check what a user has selected in one list box, and display different things based on that in a text box.

For instance, if one item in the field is selected just display that item, if all are selected display “All Items”, if certain groupings are selected use a different label.

The field Venue has five possible values: A, B, C, D, or E.

If just one or all are selected it's easy.

If the user selects A, B, and C then I want to say in the text box "A, B, and C", a bit tricker but I've gotten close using "Concat(Distinct Venue&CHR(13))".

But, if they select A, B, and D I want to say in that text box “South Region”. I do have a button to select the South Region (Select in Field (Venue), ("A"|"B"|"D")) that works but I can’t seem to be able to determine when those specific selections have been made, either with the button or via the list box.

There will never be too many combinations so I’m happy to use an If statement.

Labels (4)
1 Solution

Accepted Solutions
sunny_talwar

Added another action to the button.... Select Possible for Venue field

image.png

View solution in original post

6 Replies
sunny_talwar

Not sure I understand this "but I can’t seem to be able to determine when those specific selections have been made, either with the button or via the list box." Do you have a sample where we can see the issue?

BlondeThursday
Contributor III
Contributor III
Author

Thank you Sunny,

I've attached a simple example. I just want to know if three specific choices are made for the venue and display an explanation text ('South Region selected' or something like that).

sunny_talwar

Try this

=If(GetFieldSelections(Venue) = 'A, B, D', 'South Region')
BlondeThursday
Contributor III
Contributor III
Author

Thank you Sunny,

That's almost there!

It works if the list box was used to select the three venues but not if the button is used. Why would that be?

 

Christine

sunny_talwar

Added another action to the button.... Select Possible for Venue field

image.png

BlondeThursday
Contributor III
Contributor III
Author

Thank you Sunny!

Brilliantly helpful as usual.


Christine