Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Is there any function that I can use to check whether the contents of a variable is in a given list?
Example: If Fruit In("apple","orange","kiwi") then ...
Thanks.
Try Match() function.
If(Match(Fruit,'apple','orange',kiwi')>0,true,false)...
Try Match() function.
If(Match(Fruit,'apple','orange',kiwi')>0,true,false)...
Just FYI, if you are using a function like Match (or MixMatch or WildMatch) which returns a number representing the position in the list that the item is found, you can get away with the ">0" in the condition. The function returns 0 if the item is not found in the list which QlikView interprets as "False". Anything else, other than 0, is "True" (doesn't have to be just -1).
Might save you a second or two 😉
Stephen