- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 08:19 AM
Hi,
I am facing an issue with an inbound action condition and I need help with it.
The problem is that they don't want an incident to be created depending on the context of the email body. There are certain email body contexts that they want to ignore and not create an incident for. However, the conditions required to ignore these contexts are too long to include in the condition field.
Should I create a system property that contains the two long values separated by a comma? And how should I include this system property in the condition?
Any advice and examples would be greatly appreciated.
Thanks,
Lucy
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 08:31 AM - edited ‎02-29-2024 08:39 AM
Honestly, I havent used a property - attempted to test it now, looks it should be fine but havent tested it as on PDI. I used these 2 approaches though:
1) I put the conditioning in the Action function with Return; if it doesnt match
2) I open the sys dictionary of the field Condition in the form - I simply increase it's lenght.
1:
2:
Hope this helps!
Cheers,
Joro

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 08:31 AM - edited ‎02-29-2024 08:39 AM
Honestly, I havent used a property - attempted to test it now, looks it should be fine but havent tested it as on PDI. I used these 2 approaches though:
1) I put the conditioning in the Action function with Return; if it doesnt match
2) I open the sys dictionary of the field Condition in the form - I simply increase it's lenght.
1:
2:
Hope this helps!
Cheers,
Joro

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 08:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 08:34 AM
Hi @Lucy10 ,
There are two approaches here:
1. You can use create a system property where you can store the lengthy values. You can do this by navigating to System Properties > All in the ServiceNow instance and then clicking on New. Give your property a name and provide the necessary values.
email.body_text.contains(gs.getProperty('your_system_property_name'))
2. If you reach the max character limit, you can simply call that in the condition field via:
new scriptIncludeName().functionName(email.body_text);
And then you return true or false from the script include where you're evaluating this.
Please consider marking my reply as Helpful and/or Accept as Solution, Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-29-2024 08:35 AM
Hi @Lucy10,
The best way to handle this would be via a Script Include which you call from within the condition.
I've attached a screenshot of how ServiceNow handles this with a baseline Inbound Action for CSM (Case records)
Within the condition you call the Script Include as follows:
(The Script Include is called 'CSEMailUtil' and the method to handle this is called 'checkCaseConfigPrefix')
new CSEMailUtil.checkCaseConfigPrefix(email.subject)
Here's also another community link where it's explained if you require more info:
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Helpful.
Thanks, Robbie