dot walk through in notification sys approval table

Srini19
Tera Contributor

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

1 ACCEPTED SOLUTION

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

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

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

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

 

 

Hi,

yes correct.

You need to use email script; query RITM and print it

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

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