Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Where are you doing this?
Hello
I am doing this in a text object at front end
Thanks
Helen
Try like this
=if((Pick(WildMatch(GetFieldSelections(ED_Mode_of_Arrival_Category),'*Helicopter*'))),'Good' , 'Bad')
wildmatch for the false path will return 0, but your pick() statement expects 2 for false
but then pick is useless or?
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
no you need the if()!
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
Does Bad is not working for you?