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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
ZoeM
Specialist
Specialist

Using Match with IF Statement

Hi Community,

I am trying to use the IF and Match statements together to create the below expression:

If(GetFieldSelections(Match( Product,'Explorer','Durango,'Highlander','Pathfinder')),RGB(5,66,117))

so that if the selected items match the requirement, the button will be colored Blue (RGB code above).

I keep getting an error and any help rendered will be appreciated.

Thank you. 

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Try this may be

If(WildMatch(GetFieldSelections(Product),'*Explorer*', '*Durango*', '*Highlander*', '*Pathfinder*'), RGB(5,66,117))

View solution in original post

3 Replies
sunny_talwar

Try this may be

If(WildMatch(GetFieldSelections(Product),'*Explorer*', '*Durango*', '*Highlander*', '*Pathfinder*'), RGB(5,66,117))
ZoeM
Specialist
Specialist
Author

Extremely well done there my friend.

Do you mind explaining why we had to use the WildMatch vs. Match?

sunny_talwar

Well, I was not sure if you are going to ever select one value in Product or can you select multiple values as well... if you are going to just select 1 value..... then you can use this

If(Match(GetFieldSelections(Product),'Explorer', 'Durango', 'Highlander', 'Pathfinder'), RGB(5,66,117))