- 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 06:17 AM
Hi,
that's correct.
Did you see the event got triggered in event logs with the correct RITM record
Also are you sending the correct RITM record in 4.3->Template as the input to the action
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:31 AM
I was able to confirm that I am sending the correct RITM record in 4.3, It was unclear in the event log for which RITM is being used at the time the event was triggered. I have also set the Table on the Notification to the sc_req_item table but still got "undefined" when send the notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2021 06:38 AM
Hi,
Can you check by printing the RITM number
template.print(current.number);
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:39 AM
Hi,
Also are you sure the catalog item to which this RITM belongs has that variable?
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:42 AM
That is coming back as undefined as well. The item as the variable through a variable set.