Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
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