Question

ticket automator - build condition using Build Expression

  • 18 March 2024
  • 1 reply
  • 24 views

Userlevel 2
Badge +3

I’m trying to figure out my first Condition using Build expression.

I’d like to do the following and can’t figure out how

Contains “report”

OR

(Contains “text1” and Doesn’t Contain “text2”)

 

can someone provide some resources on where i can learn to build these expressions please?


1 reply

Userlevel 6
Badge +11

Hi.

You could try something like this:

((indexOf({{ticket.subject}}, 'texttolookfor', 0) >= 1) && (indexOf({{ticket.subject}}, 'text2tolookfor', 0) < 1)) || (indexOf({{ticket.subject}}, 'report', 0) >= 1)

 

It will: look for thext “texttolookfor” in a field and check that “text2tolookfor” does not exist in the same field, or, that it contains the word “report” in the same field.

 

Hope this helps.

 

Regards,

Reply