How can I pass a catalog item variable to a mail script?

Anthony Dyer
Tera Contributor

I have created an Action in Flow designer to trigger an event which will send out a notification.  With in that notification I need to pass the date variable that the user inputs.  I have created a template and use the mail script to print this value, but it is coming back as undefined.  Here are screen shots of the Action and mail script.  Not sure what I am doing wrong and any assistance would be helpful.

 

Action:

find_real_file.png

Flow:

find_real_file.png

Mail Script:

find_real_file.png

1 ACCEPTED SOLUTION

Hi,

your event is on sc_req_item table

but in the event log the table is different

Unless the event triggers on the sc_req_item table it won't work

Can you check the inputs.template object belongs to which table

try adding this log

gs.info(inputs.template.sys_class_name); // check the table name

Regards
Ankur

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

View solution in original post

23 REPLIES 23

Hi,

So it means the RITM object is not sent properly.

That is what I mentioned in my earlier comment that the object of RITM is not valid

can you share the event log for that event

Regards
Ankur

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

find_real_file.png

Hi,

your event name and the name of event in screenshot is different

Regards
Ankur

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

Sorry I thought that was the log for the event.  Here is the correct one

 

find_real_file.png

Hi,

your event is on sc_req_item table

but in the event log the table is different

Unless the event triggers on the sc_req_item table it won't work

Can you check the inputs.template object belongs to which table

try adding this log

gs.info(inputs.template.sys_class_name); // check the table name

Regards
Ankur

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