Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to tell if exact value is selected ?

I need to tell if a specific value is selected, all I've seen so far is about using something like GetFieldSelections and then search for the string inside it, the problem is that I have multiple situations where one value is the substring of another value, for example :


I have the following table :


COLUMNA
-------------------

Value

Sub Value

Another Value

I want to check if the string Value is selected, but the method by checking the string will fail because it will return <> 0 if the string Sub Value is selected, and this is not what I want.


Any ideas ?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try something like

=Count({<COLUMNA *=  {'Value'}>} COLUMNA)

This will also return a true value if you have no selections in field COLUMNA, or multiple selection including 'Value'.

You can enforce active selection of only value 'Value' using

=Count({<COLUMNA *=  {'Value'}>} COLUMNA) and GetSelectedCount( COLUMNA) = 1

View solution in original post

2 Replies
swuehl
MVP
MVP

Try something like

=Count({<COLUMNA *=  {'Value'}>} COLUMNA)

This will also return a true value if you have no selections in field COLUMNA, or multiple selection including 'Value'.

You can enforce active selection of only value 'Value' using

=Count({<COLUMNA *=  {'Value'}>} COLUMNA) and GetSelectedCount( COLUMNA) = 1

Not applicable
Author

Perfect, thanks a lot, I didn't know about that *= operator.