Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Wildmatch on strings

Hi there,

I am new to Qlik so I'd have a question about Wildmatch if anyone can help. I am looking to match some expressions from a field and assign them to a new field depending on the expression that is found.  The problem I am facing is that the syntax I am using does not give me the result I am looking for :

Pick (Wildmatch(Field, '*Secondary School*', '*School*'...), 'Secondary School', 'School') as NewField

In the NewField, both expressions get assigned to 'School' rather than being distinguished between  'Secondary School' and 'School'.

Any ideas on how to solve this would be much appreciated!

Thank you

1 Solution

Accepted Solutions
sunny_talwar

Your statement looks good because if the WildMatch Finds a match with the first check, it would not need to go the next one... So in that case Secondary School should be picked correctly... may be you need another asterisk between Secondary and School?

Pick (Wildmatch(Field, '*Secondary*School*', '*School*'...), 'Secondary School', 'School') as NewField

View solution in original post

5 Replies
pradosh_thakur
Master II
Master II

Pick (match(Field, 'Secondary School', 'School'), 'Secondary School', 'School') as NewField

Learning never stops.
sunny_talwar

Your statement looks good because if the WildMatch Finds a match with the first check, it would not need to go the next one... So in that case Secondary School should be picked correctly... may be you need another asterisk between Secondary and School?

Pick (Wildmatch(Field, '*Secondary*School*', '*School*'...), 'Secondary School', 'School') as NewField

MarcoWedel

please provide some sample data and your expected result.

thanks

regards

Marco

Anonymous
Not applicable
Author

The answer provided by Sunny worked - thank you, much appreciated!!

MarcoWedel

thanks for your response.

please close your thread:

Qlik Community Tip: Marking Replies as Correct or Helpful

thanks

regards

Marco