- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 01:34 AM
Hi All,
I have a workflow attached to a catalog item.
This item is just a request for a specific service, with variables containing text that describes what the user wants.
My first 'wiget' in the workflow is for approval.
When the approver gets the email, it doesnt describe what the request is for. I need some way to pass one of the variables to the email so the approver can read what it says.
I looked in the email template and it contains the line :-
Comments:
${sysapproval.description}
Which just produces a blank line in the email as that field is empty.
Please, how can i either populate the sysapproval.description field from within the workflow,
or somehow pass one of my other variables to the email so that i can let the approver see some details from the request
Many thanks
Andy
below is a picture of how the email currently arrives - for clarity (The short description just contains the name of the requested item) . I want to include some text from one of my variables into this email
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 01:37 AM
Hi,
you cannot do this directly via dot walking
you would require email script for this
check this link for solution
Display the Requested item variables in approval 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
‎02-17-2022 01:36 AM
Hi,
are you using OOB email notification on approval 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-17-2022 01:37 AM
Hi,
you cannot do this directly via dot walking
you would require email script for this
check this link for solution
Display the Requested item variables in approval 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
‎02-17-2022 02:34 AM
Hi Ankur,
Thank you, I tried the script and it all works great, apart from 1 line .. The line
template.print('Requested For: '+current.u_mhs_requested_for.getDisplayValue());
Just produces "Requested For : undefined"
Could you please help me fix that ?
Many thanks
Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 02:41 AM
Sure
Field "u_mhs_requested_for" is on RITM?
if yes then you must be already querying sc_req_item in email script
just use that GlideRecord object instead of current
obj.u_mhs_requested_for.getDisplayValue()
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader