- 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 03:32 AM
Thanks for help so far ..
I just blindly copied the script that you suggested and pasted it into my instance.
Im not sure where 'u_mhs_requested_for" is , it is not a variable that i have created.
I tried changing it to just 'current.requested_for.getDisplayValue()' incase that name was specific to the other persons instance - but that still came back as undefined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 03:36 AM
then remove that line.
The script was just for your reference and not to be copied directly. you should enhance to suit your case
If my response helped please mark it correct and close the thread so that it benefits future readers.
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:42 AM
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
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:45 AM
Hi Ankur , yes we are using OOB email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2022 01:56 AM
then you need to include email script in that and show the variables
Solution link I already shared above.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader