- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2018 02:21 PM
I need to pull a service catalog variable on "sc_req_item" table to email notification. I am reading that the variable first needs to be defined on email script before adding to the email notification which makes sense but I am not sure how to write the mail script. Can someone help me with this? The variable name is "Item_Requested". Thanks.
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2018 12:12 PM
Thanks for all the responses back to my post. The request changed from adding just one variable to the notification to adding all variables on the catalog item to the notification. I used the mail script below to achieve that objective.
for (var key in current.variables) {
var v = current.variables[key];
template.print('\n' + v.getGlideObject().getQuestion().getLabel() + ": " + v.getDisplayValue() + " <br />");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2021 10:14 AM
Hi Nishant,
I am having the same problem, where you able figure out the solution? Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2021 07:28 AM
Hi Mekonnen,
I have the same requirement, can you please let me know how did you develop this so that it will be helpful to me.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2021 07:28 AM
Hi Nishant,
I have the same requirement, can you please let me know how did you develop this so that it will be helpful to me.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2023 06:10 AM
I am using this email script and it is mostly working. Issue is it isn't populating all of my variables. There are a few variables within a variable set and none of those are showing in my email notification and then there are a few more variables attached directly to the catalog item that aren't showing. I did notice that only ten are showing in my email so maybe this use of key limits at ten. Anyone know if that's true or why I wouldn't see every variable? Thanks.