- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2021 05:51 AM
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:
Flow:
Mail Script:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2021 09:39 PM
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2021 05:54 AM
Hi,
Can you try to update as this if the current object is sc_req_item
var string = current.variables.maintenance_date.toString();
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
02-10-2021 05:58 AM
I have made the change but it is still coming back as "undefined"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2021 06:06 AM
Hi,
the email notification and event is on which table?
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
02-10-2021 06:11 AM