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: 
prahlad_infy
Partner - Creator II
Partner - Creator II

What should be in load script to write multiple condition ?

Hello Sirs ,

How to compose this in load script ?

if

Field1 = abc  And Field2 = 123 ,Field3 = 12a AND Field4 not be having  a , c OR  k  then ' 1ST Attempt' as Field_New

if

Field1 = abc  And Field2 = 123 ,Field3 not equals to 12a AND Field4 not be having  a , c, k  but Field4 has b , q then ' 2ndttempt' as Field_New


Thank you all in advance !!

1 Solution

Accepted Solutions
sunny_talwar

My bad, may be this

If(Field1 = 'abc' and Field2 = 123 and Field3 = '12a' and not Match(Field4, 'a', 'c', 'k'), '1st Attempt',

If(Field1 = 'abc' and Field2 = 123 and Field3 <> '12a' and Match(Field4, 'b', 'q'), '2nd Attempt')) as Field_new

If Field4 is b and q... then it will def not be a, c, k.. so you don't really need not Match(Field4, 'a', 'c', 'k')

View solution in original post

4 Replies
sunny_talwar

May be this

If(Field1 = 'abc' and Field2 = 123 and Field3 = '12a' and not Match(Field4, 'a', 'c', 'k'), '1st Attempt',

If(Field1 = 'abc' and Field2 = 123 and Field3 <> '12a' and not Match(Field4, 'a', 'c', 'k'), '2nd Attempt')) as Field_new

prahlad_infy
Partner - Creator II
Partner - Creator II
Author

Thank you Sir ,

how to set this part

Field1 = abc  And Field2 = 123 ,Field3 not equals to 12a AND Field4 not be having  a , c, k but

Field4 has b , q then ' 2ndttempt' as Field_New

sunny_talwar

My bad, may be this

If(Field1 = 'abc' and Field2 = 123 and Field3 = '12a' and not Match(Field4, 'a', 'c', 'k'), '1st Attempt',

If(Field1 = 'abc' and Field2 = 123 and Field3 <> '12a' and Match(Field4, 'b', 'q'), '2nd Attempt')) as Field_new

If Field4 is b and q... then it will def not be a, c, k.. so you don't really need not Match(Field4, 'a', 'c', 'k')

prahlad_infy
Partner - Creator II
Partner - Creator II
Author

Thank you Sir