Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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
helen_pip
Creator III
Creator III
Author

Hello Anil

I have got the expression to work as follows:

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

I had hoped to remove the If completely if it is inefficient, as the purpose of this exercise is to improve efficiency in some of my expressions

I opted for WildMatch as the original expression was:

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

'Good',

'Bad'

)

Do you know whether my opting for Wildmatch is better then using If and Like

Kind Regards

Helen

Anonymous
Not applicable

you want to check getfieldselections which returns 1 value against '*Helicopter*' ?

I don't understand what you're trying to optimize?

I think that caculation will be done once per selection...

Anil_Babu_Samineni

Try this?

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

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