Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Specialist
Specialist

If = statement in load using wildcard function

Hi,

Thank you for your time in advance......

I am having trouble using an If = statement as below using a wild card (*)

If i load as this

Load
Items,

If(Items =
'JF CL WARN' ,

Items) As [Warning Label]

The result is as expected and the Ref 'JF CL WARN'  is shown as a [Warning Label]

davyqliks_0-1645542529526.png

 

However, if i load as follows:

Load
Items,

If(Items =
'*WARN*' ,

Items) As [Warning Label]

i do not associate the required item as a warning label

davyqliks_1-1645542647305.png

 

I would like to use wild card so i can capture multiple labels with 'WARN' in the name.

 

Thank you so Much for your help,

Regards

 

Daniel

 

 

Labels (2)
1 Solution

Accepted Solutions
marcus_sommer

You need like in such case: ... Field like '*value*' ... or maybe switching to: ... wildmatch(Field, '*value*')

- Marcus

View solution in original post

2 Replies
marcus_sommer

You need like in such case: ... Field like '*value*' ... or maybe switching to: ... wildmatch(Field, '*value*')

- Marcus

davyqliks
Specialist
Specialist
Author

This is perfect,

thanks, i achieved like the below based on comments:

Load
Items,
If(WildMatch(Items,'*CL*'),Items) as [Care Labels]
Resident ItemLoads
where not WildMatch(Items,'JF CL WARN')

 

Thank you


Daniel