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: 
Not applicable

Current selection includes specific string

I am trying to create a conditional expression for a button that changes its color based whether a certain entry in a field is selected. This is what it looks like:

if(loanType = 'Mortgage", rgb(32,200,53), rgb(196,0,0))

This only works if only that specific entry in the loanType field is selected. Once I select another loan type on top of Mortgage the loanType = 'Mortgage' expression is no longer true even though Mortgage is still selected. Is there an expression that I can use that remains true as long as Mortgage is selected, regardless of whether any other entries in that field are also selected?

Thanks for the help.

1 Solution

Accepted Solutions
Not applicable
Author

Try with this expression:

if(WildMatch(concat(loanType ),'*Mortgage*'), rgb(32,200,53), rgb(196,0,0))

View solution in original post

2 Replies
Not applicable
Author

Try with this expression:

if(WildMatch(concat(loanType ),'*Mortgage*'), rgb(32,200,53), rgb(196,0,0))

Not applicable
Author

Works great, thank you.