How I can check short description of new incident for a word and execute rule based on it?

KaraBia
Tera Contributor

Hey,

How I can check short description of new incident for a word and execute rule based on it?

1 ACCEPTED SOLUTION

Martin Ivanov
Giga Sage
Giga Sage

MartinIvanov1_0-1664793885332.png

 

Hi. This is some basic check. You can use it in busieness rule, where you will get the value of the description field and check in int. Basically, if your description contains this word, indexOf will return the index where the word is starting. If not, it will return -1.

 

Please mark Correct and Helpful if my answer helps you resolve your issue. Thanks!
Martin Ivanov
Community Rising Star 2022


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

View solution in original post

2 REPLIES 2

Martin Ivanov
Giga Sage
Giga Sage

MartinIvanov1_0-1664793885332.png

 

Hi. This is some basic check. You can use it in busieness rule, where you will get the value of the description field and check in int. Basically, if your description contains this word, indexOf will return the index where the word is starting. If not, it will return -1.

 

Please mark Correct and Helpful if my answer helps you resolve your issue. Thanks!
Martin Ivanov
Community Rising Star 2022


Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Martin Ivanov
ServiceNow MVP 2023, 2024

ServiceNow SA
Kilo Guru

Hi,

 

You can use gr.addQuery('short_description', 'CONTAINS', 'word');