Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
bartvana
Contributor
Contributor

Exclude results from Button search string

Hello,

I am making a button to "Select values matching search criteria". I understand the basics and can get this working, but I don't succeed in excluding certain results.
In particular, I want to search for "GP*", but exclude "GPF*" and "GP?S*" from the results.

The search term in the screenshot below, namely 

='("GP*")'

works fine, but obviously doesn't exclude anything:

 

What would be the search term for excluding "GPF*" and "GP?S*" ?

Many thanks in advance!

Labels (3)
1 Solution

Accepted Solutions
Nicole-Smith

Assuming you are using the button Qlik Sense object and not an extension, I would suggest setting your button action to "Select values in a field" and set the Value equal to this expression:
=concat({<[Field Name]={"GP*"}-{"GPF*","GP?S"}>} distinct [Field Name], ';')

This will create a list of all possible values while excluding the ones you don't want.

View solution in original post

3 Replies
Nicole-Smith

Assuming you are using the button Qlik Sense object and not an extension, I would suggest setting your button action to "Select values in a field" and set the Value equal to this expression:
=concat({<[Field Name]={"GP*"}-{"GPF*","GP?S"}>} distinct [Field Name], ';')

This will create a list of all possible values while excluding the ones you don't want.

bartvana
Contributor
Contributor
Author

Thanks for answering!

Yes, that's the button Qlik Sense object.

bartvana_2-1607522643131.png

But I seem to get an error in the expression (I copy-pasted your suggestion).

bartvana_0-1607522582532.png

 

bartvana
Contributor
Contributor
Author

Sorry for my stupid mistake above, I obviously forgot to substitute my specific Field Name...🙄

Works perfectly now of course, thank you!