How to populate the all variables of submitted catalog item in the notifications
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2024 01:14 AM
How can I populate all variables in the notification from the submitted catalog item. I tried updating it with email script but the variables are not getting populated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2024 03:16 AM
Try this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2024 03:19 AM
I tried adding these lines also, but variables are not getting populated in the email triggered
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2024 03:26 AM
Maybe the problem is not in your email script rather than how you call it from the workflow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2024 03:32 AM
I have added the email script in the notification itself and the notification is getting triggered based in the event.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-05-2024 04:39 AM
Try this script:
(function runMailScript(current, template, email, email_action, event) {
template.print('Variable Summary: <br/>');
varvariables = current.variables.getElements();
for (var i=0;i<variables.length;i++) {
var question = variables[i].getQuestion();
var label = question.getLabel();
var value = question.getDisplayValue();
if(label != ''){
template.space(4);
template.print(' ' + label + " = " + value + "<br/>");
}
}
})(current, template, email, email_action, event);