Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I am currently using wildmatch to create a filter that searches a specific column for the presence of a number of strings.
for example, the column would be called Fruits and a value inside of it would look like
Apple, Pear, Peach, Orange, Apple Pear
Currently, I have several filters with the following codes:
If(WildMatch([Fruit$.Fruit Type],
'*Apple*',
'*Orange,*',
'*Grape,*',
'*Pear*',), 'Tasty Fruits')
If(WildMatch([Fruit$.Fruit Type],
'*Lemon*',
'*Lime,*',
'*Apple Pear,*'), 'Decent Fruits')
I would like to be able to filter and only show things that are 'Tasty Fruits' . However, in the case of Apple and Apple Pear, the Tasty Fruits Filter would pick up Apple Pear as Apple due to the asterisks.
Is there any way to fix this problem? Thanks!
Perhaps like this:
If(WildMatch([Fruit$.Fruit Type],
'*Apple,*',
'*Apple',
'*Orange,*',
'*Grape,*',
'*Pear*',), 'Tasty Fruits')
If(WildMatch([Fruit$.Fruit Type],
'*Lemon*',
'*Lime,*',
'*Apple Pear,*'), 'Decent Fruits')
Change this :
If(WildMatch([Fruit$.Fruit Type],
'*Lemon*',
'*Lime,*',
'*Pear,*'), 'Decent Fruits')
Hi Omar,
Thanks for the reply. I have tried this. However, by adding the comma before the asterisk, I would be unable to check if the last item in the list is a part of the filter due to it not having a comma after it. Would anything else work?
Thanks
Perhaps like this:
If(WildMatch([Fruit$.Fruit Type],
'*Apple,*',
'*Apple',
'*Orange,*',
'*Grape,*',
'*Pear*',), 'Tasty Fruits')
If(WildMatch([Fruit$.Fruit Type],
'*Lemon*',
'*Lime,*',
'*Apple Pear,*'), 'Decent Fruits')
Thank you Gysbert!