- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 02:24 AM
Hi Expert,
I want to send email notification based on some condition of request item variable value. How do i dot walk through of Requested item variables from sysapproval_approver table. I tired but couldn't able to get it. Please assist if you could so.
Thanks
Srini
Solved! Go to Solution.
- Labels:
-
Notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 06:59 PM
Hi,
if it's normal variable set and not MRVS then syntax is the same just like you fetch normal variables
current.variables.last_name
regards
Ankur
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-08-2022 02:27 AM
Hi,
you cannot dot walk
use Advanced condition in notification with script
var gr = new GlideRecord("sc_req_item");
gr.addQuery("sys_id", current.sysapproval);
gr.query();
if (gr.next()) {
if(gr.variables.variableName == 'Your Value')
answer = true; // allow notification
else
answer = false; // block notification
}
Regards
Ankur
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-08-2022 02:54 AM
Hi Ankur,
Thanks for your advise, I will try this code.
Similarly we can't use the variables from select variables for email message body right. Because I want some values details from Request item table to show that in my message body. How we can achieve this? kindly let me know with sample if possible.
Thanks
Srini
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2022 03:38 AM
Hi,
yes correct.
You need to use email script; query RITM and print it
Regards
Ankur
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-08-2022 09:03 AM
Hi Ankur,
I have a variable set in that RITM. which has variables. How do i print that in email body.
for example:
Variable set name is ACB_vistior details
variable name under above variable set is Last_name
how do I print this last_name variable in to email body by using email script. Please advise with example.
Thanks
Srini