how to match the Worknotes values dynamically using Business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 05:33 AM
Can anyone explain how to match the incident work notes values in Business rule to create a Parent/Child relationship.
MetricName: 'testing';
PodName: 'testing1';
Based on above these two values from work notes we need to create a parent/child relationship in Incident table.
Thank You!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 03:58 PM
Hey there,
You should be able to create a Business Rule where the conditions are "Work Notes" <changes>. Then in the script, you will need the following:
var notes = current.work_notes.getJournalEntry(-1);
if(notes.indexOf("MetricName: 'testing';" > -1 && notes.indexOf("PodName: 'testing1';" > -1) {
// make the association to your parent incident here
}
Hope that helps!
~Nick

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 07:20 PM
You can think of using GlideSPScriptable.getStream function.
Here is the Article for your reference on how to use
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 11:43 PM - edited 09-19-2024 11:46 PM
Hi @Ajay Singh2
You can use script to verify the work notes of the current record by using methods such as: indexOf, includes, contains, etc.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-20-2024 12:56 AM
Hi Timi I have written below codes but not working as Incident is created from sending alerts.