- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 07:15 PM
Hello All,
We got a requirement from customer like when RITM gets updated or any comments added in the RITM then an email notification will be send to User/Group Watchlist members.
For that I created a Variable Set, in that i have created 2 variables with list collector type.
1. User Watchlist-reference to user table.
2.Group Watchlist-reference to group table.
I have created a new Notification to sc_req_item table but i'm unable to select Variable set or variables inside variable set so that those members can get emails.
Please help me how we can achieve this and what are steps needs to be followed.
Can we achieve this by email script?
@Ankur Bawiskar @Community Alums
Thanks,
Abdul
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2024 04:24 AM
why would the variable change later on? Ideally they should not once RITM is submitted.
It's not recommended.
you can use workflow run script to set the fields using the variables
Simply use this logic
1) when RITM is created populate the fields on RITM with the variable values -> workflow run script
current.setValue('watch_list', current.variables.users_watchlist.toString());
current.setValue('group_list', current.variables.group_watchlist.toString());
2) then have Insert, Update Notification and set the recipient as those 2 fields
3) condition is Comments changes
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 07:29 PM
@sattar3 ,
how are you trying to add the variables
basically the syntax to call variables into notification is ${variables. VARIABLE_NAME} ,
Can you try with this
Regards,
Shyamkumar
Regards,
Shyamkumar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 07:34 PM
HI @sattar3 there is no need to create new variables, there are 2 fields already on RITM which is "watch list" and "group list", you could use these fields to send notification, no code required, just add users and group to these fields and in notification who will receive, add these fields
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 07:38 PM
@Harish KM yes fields are available but user using portal to raise a request, in portal those fields are not available because of that i created a new variable set.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 08:14 PM
Hi @sattar3 ,
Please refer to below thread:
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda