Conditional Logic for Incidents
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hello community members! This may sound like a very simple question but I am new to ServiceNow development. How would I set up conditional logic for Incidents? Specifically, if the short description contains "Incident INC-1 opened" then assign it to a specific group. One of the challenges is the number will consistently increment by one every time a new Incident is created. Any help here is appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago - last edited an hour ago
Hello @sseverance ,
1.Create a new Assignment Rule
Table: Incident
Condition:
Short description contains Incident INC-
OR
2.Business Rule
Table: Incident
When: Before
Insert: Checked
Script:
(function executeRule(current, previous) {
if (current.short_description &&
current.short_description.indexOf('Incident INC-') > -1) {
current.assignment_group = 'YOUR_GROUP_SYS_ID';
}
})(current, previous);
"If you found my answer helpful, please like and mark it as an "accepted solution". It helps future readers to locate the solution easily and supports the community!"
Thank You,
Sujit Jadhav
