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: 
Sara_3
Creator
Creator

Match () with variable values

I have a field name [Part Number ] , when it selected i need to check if [Part Number ]  is match with given Part numbers in variable so 1 otherwise 0.

i create a SET variable:

SET vPartNumIndicator = '1F*' , '90*' , '91F*' ,  '*GS*';

in load editor I create if statement:

If(Match([Part Number ] ,$( vPartNumIndicator)),'1,'0') as  Flag

 

It does not work , anyone has an idea why?

Labels (5)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

this works

 

SET vPartNumIndicator = '1F*','90*','91F*','*GS*';  << remove space

temp:
Load PartNumber, If(WildMatch(PartNumber,$(vPartNumIndicator)),1,0) as Flag  << use wildmatch
Inline [
PartNumber
1Fsksks
91Fwrwerw
abcwefwef
yesno
];

outputoutput

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

3 Replies
vinieme12
Champion III
Champion III

this works

 

SET vPartNumIndicator = '1F*','90*','91F*','*GS*';  << remove space

temp:
Load PartNumber, If(WildMatch(PartNumber,$(vPartNumIndicator)),1,0) as Flag  << use wildmatch
Inline [
PartNumber
1Fsksks
91Fwrwerw
abcwefwef
yesno
];

outputoutput

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Sara_3
Creator
Creator
Author

Thanks yes wildmatch works !
vinieme12
Champion III
Champion III

happy to help

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.