Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Re: Current selection includes specific string

Try with this expression:

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

2 Replies
Not applicable

Re: Current selection includes specific string

Try with this expression:

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

Not applicable

Re: Current selection includes specific string

Works great, thank you.

Community Browser