Notification condition doc.subject contain "xyz"

how to make condition on notification doc.subject contain “xyz” or doc.subject like “%xyz%”?
i try eval:(doc.subject.indexOf(“Urgent”) !== -1) but can not save, is there any suggestion?


possible typo…
!== should be(I think) !=

not "Urgent" in doc.subject

hi, i’ve try change the operator but still invalid

hi, i’ve tried not “Urgent” in doc.subject but still invalid, i’ve tried “Urgent” in doc.subject also invalid

Here you can see in the dialog that you are not using " but and it’s not the same. Be careful with that.

thank you, sorry my mistake, i try to write it all again, but the result still is invalid


Try without the “eval:”

it still is invalid

“substring” in “fullstring” → work, can be saved, no error.
“substring” in doc.subject → does not work, error the condition is invalid


is doc.subject not string?

I don’t know what’s happening, it seems like a bug. But i tested it and you need to know this:

doc.subject and "Urgent" in doc.subject

Anyways, you should test if it evals to True when needed.

I think that it happens because at the “validation” time, the condition is checked with a blank doc, and subject is None

Thank you so much my friend :smile: it works!
hopefully it can work perfectly on production stage.