Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
MB2024
Contributor II
Contributor II

IF statement with 2 GetfieldSelections

I need help to Write a Simple IF Statement with 2 GetfieldSelections.

I have a page of KPI boxes that I am trying to update based on the user input.  It works when the user select's 1 option from the dropdown, however when the user select 2 options it isn't working. 

This is my attempt of an IF statement  based on application type, when the user has selected Email and Telephone from the dropdown.

If((GetfieldSelections([application Type])='Email' AND GetfieldSelections([application Type])='Telephone'),'true','false')

Any help appreciated.

Labels (1)
3 Replies
Or
MVP
MVP

When a selection of more than one value has been made on a field, GetFieldSelections() will return a string containing all of those values concatenated. You'll need to use something like WildMatch(), as the straight comparison will not work.

MB2024
Contributor II
Contributor II
Author

Thanks Or - can you tell me what i am doing wrong

if(wildmatch( [application Type],'Email','Telephone'),'true','false')

Or
MVP
MVP

Two things - one, you've removed the GetFieldSelections(), so this will not work because when two values are selected, application type is not equal to any single value. Two, you'll want to use e.g. '*Email*' with WildMatch() since GetFieldSelections will return a concatenated string, not an array.