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: 
helen_pip
Creator III
Creator III

Pick(Wildmatch(GetFieldSelections requires help

Dear Qlikview user

I have a button which if the user clicks on, I want the text in another text object to say "Good" otherwise "Bad"

My expression is as follows, but I cannot seem to get the "Bad" wording to appear:

Pick(WildMatch(GetFieldSelections(ED_Mode_of_Arrival_Category),'*Helicopter*'),'Good','Bad')

Can anyone help me with this technqiue

In addition my original expression was an If statement, but thought a Pick(Wildmatch would be more efficient, but if an IF is O.K. t use then I will scrap the idea of a Pick(Wildmatch(

Any help would be greatly appreciated

Thanks

Helen

12 Replies
Anil_Babu_Samineni

Where are you doing this?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
helen_pip
Creator III
Creator III
Author

Hello

I am doing this in a text object at front end

Thanks

Helen

prma7799
Master III
Master III

Try like this

=if((Pick(WildMatch(GetFieldSelections(ED_Mode_of_Arrival_Category),'*Helicopter*'))),'Good' , 'Bad')

Anonymous
Not applicable

wildmatch for the false path will return 0, but your pick() statement expects 2 for false

Anonymous
Not applicable

but then pick is useless or?

helen_pip
Creator III
Creator III
Author

It would seem pick is useless on this instance. I am working on the Wildmatch option now!

I.e.

WildMatch(GetFieldSelections(ED_Mode_of_Arrival_Category),'*Helicopter*','Good','Bad')

Thanks

Helen

Anonymous
Not applicable

no you need the if()!

helen_pip
Creator III
Creator III
Author

The following expression works:

If(WildMatch(GetFieldSelections(ED_Mode_of_Arrival_Category),'*Helicopter*'), 'Good', 'Bad')

However I am using Wildmatch to replace the original expression(Below) as I had hoped Wildmatch would be more effiecient than "like":

=If(GetFieldSelections(ED_Mode_of_Arrival_Category) Like '*Helicopter*',

"Good"

"Bad"

)

I would ideally like to remove the IF statement completely if this improves efficiency

Kind Regards

Helen

Anil_Babu_Samineni

Does Bad is not working for you?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful