- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2018 03:31 PM
Hello all,
I am trying to find a way to display the checkbox value instead of "true" "false" on the email notification "Request Opened on behalf". We would like for the requester to receive a list of the software requested in the email, but the way the values are showing now are just true, false.
I looked through other threads and some say email script but I have no idea where to get started on this because I don't know much about scripting, but can anyone assist with this? Or point me to the right direction?
E.g. Software list: microsoft office, adobe creative cloud, dreamweaver, etc.
If user selects office but not the other ones then the email notification look something like this:
Number: RITM4242
Requested for: Jane Doe
Software requested: Microsoft Office
My email script below:
Thanks in advance,
Grace
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2018 11:19 AM
This was my solution:
1. Create a notification email script (e.g. checkbox) and list out your checkbox values accordingly:
(function runMailScript(current,template,email,email_action,event) {
if(current.variables.checkbox_value=='true'){
template.print("Checkbox Name," + ' ' );
}
if(current.variables.checkbox_value2=='true'){
template.print("Checkbox Name2," + ' ');
}
..........
template.print('</p>');
})(current, template, email, email_action, event);
2. Create an email notification and add the email script to an email template
e.g. Add the following in message HTML = ${mail_script:NAMEHERE}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2018 11:19 AM
This was my solution:
1. Create a notification email script (e.g. checkbox) and list out your checkbox values accordingly:
(function runMailScript(current,template,email,email_action,event) {
if(current.variables.checkbox_value=='true'){
template.print("Checkbox Name," + ' ' );
}
if(current.variables.checkbox_value2=='true'){
template.print("Checkbox Name2," + ' ');
}
..........
template.print('</p>');
})(current, template, email, email_action, event);
2. Create an email notification and add the email script to an email template
e.g. Add the following in message HTML = ${mail_script:NAMEHERE}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2022 01:45 PM
I am trying to use this mail script but it is not printing anything in the notification. Here is the script I've written.
The checkbox variables are "dynamics_crm", "waterquote" and "repe_number".
What am I doing wrong?
(function runMailScript(current,template,email,email_action,event) {
if(current.variables.dynamics_crm=='true'){
template.print("Dynamics CRM," + ' ' );
}
if(current.variables.waterquote=='true'){
template.print("WaterQuote," + ' ');
}
if(current.variables.repe_number=='true'){
template.print("REPE number," + ' ');
}
template.print('</p>');
})(current, template, email, email_action, event);