Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I want to know if it is possible to check the presence of multiple "values" within a string.
This is my case. I have a column called COLORS filled with these records (each of them is a singular string):
green,blue
red,green
red,blue,yellow
yellow,blue,red
yellow,red,blue,green
green,red,blue
...
If I want to control that a specific color (e.g. green) is not present in the string, I do this:
if(not wildmatch(COLOR, '*green*'), 'check', 'ok')
What should I do to control multiple colors in the same string? I can't do like this ('*green,blue*') because sometimes the values are written in a different order and so the string is different.
Any suggestion?
I got my parens in the wrong place
if(WildMatch(COLOR,'*yellow*','*orange*','*green*','*red*','*blue*')
and not WildMatch(COLOR,'*yellow-*') , 'check', 'ok')
-Rob
It still give me no result.
Can you post some sample data and the results you are seeing?
-Rob
I have solved the issue in this way. Anyway, thanks a lot.
if(Left(NAME, 5) = '2019_' and WildMatch(COLOR,'*yellow-orange*','*green-blue*'.), 'check',
if(Left(NAME, 5) = '2022_' and WildMatch(COLOR,'*yellow,*','*yellow','*orange,*','*green*','*red*','*blue*'), 'check', 'ok'))