How to show only fields with changed value in sent notification on Incident update?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 10:54 AM
Hi,
I have a requirement to send a notification to Incident Manager when ever Incident's fields value are changed and updated. Notification should contain only those fields that have changed the value and who has changed and when it has been updated.
I have tried to achieve it by gs.eventQueue() method in BR, but not showing the changed field value in the sent notification.
Here is the script:
BR script :
gs.eventQueuue("event_name", current, previous,"");
Notification script :
for (var x in current){
if (current[x] != previous[x]) {
template.print("Field"+current[x]+"has changed");
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 10:57 AM
Hi there,
Please don't double post your questions. Remove one please.
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2023 01:56 PM
Hi @Varsha Soni
What is the value set on when to run is that Before or After? Try After
If my response helped please mark it correct and helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2023 02:06 PM
Hi Prabu,
Thanks for the reply.
When to run value is After Update, but didn't work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2023 02:31 PM
Hi,
Could it be the mis-spelling of "eventQueuue", and should be "eventQueue".