Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jensej
Creator
Creator

IF trigger with multiple conditions

Hello!

I want to use the IF trigger to do one thing in the job if the globalMap.get("output") contains the words csv or xml and do something else.

I've tried only with csv like this and it worked

option 1

((String)globalMap.get("output")).contains("csv") == false

option 2

((String)globalMap.get("output")).contains("csv") == true

now i wanted to check also for xml but i can't get it to work. I tried like this....

option 1

(String)globalMap.get("output")).contains("csv") == true|| ((String)globalMap.get("output")).contains("xml") == true

option2

(String)globalMap.get("output")).contains("csv") == false || ((String)globalMap.get("output")).contains("xml") == false

I read that || = or so in my opinion it should ask if string contains csv or xml then go this way and if not go the other way.

what am i doing wrong?

Labels (2)
2 Replies
jensej
Creator
Creator
Author

I think i solved it myself.

It has to be

option 1

(String)globalMap.get("output")).contains("csv") == true || ((String)globalMap.get("output")).contains("xml") == true

option 2

(String)globalMap.get("output")).contains("csv") == false && ((String)globalMap.get("output")).contains("xml") == false

Mehdi_Mhedhbi2
Contributor III
Contributor III

with your current configuration :

the first option will be triggered if the globalMap variable contains csv or xml

the second option will be triggered if the globalMap variable does not contains neither csv or xml