
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2018 12:26 PM
Greetings Folks
I have a notification script that advises our end-users when we receive their message. The notification pulls the subject line from the New Call Short description field. What I am looking for is how I would italicize the short description so as to make it more readable for our end users.
I know that <i> </I> is the element tag that I want to use, but I am not sure how to get that part into my script properly to achieve the output I want.
My script looks like this:
//Script for notification to caller that Email was received
(function runMailScript(current, template, email, email_action, event) {
template.print('<p><font size="5" color="#808080" face="Calibri"><strong>');
template.print("Greetings " + current.caller.first_name +",");
template.print('</strong></font></p>');
template.print('<p><font size="3" color="#808080" face="Calibri"><strong>');
template.print("Your message for IT Support: " + current.short_description + " has been received. We will respond to you as soon as possible.");
template.print('</strong></font></p>');
})(current, template, email, email_action, event);
And I want to set the "current.short_description" in italics
Any suggestions?
Cheers
A.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2018 12:33 PM
Hi Arthwys,
You can insert the tags directly into the print output:
template.print("Your message for IT Support: <i>" + current.short_description + "</i> has been received. We will respond to you as soon as possible.");

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2018 12:33 PM
Hi Arthwys,
You can insert the tags directly into the print output:
template.print("Your message for IT Support: <i>" + current.short_description + "</i> has been received. We will respond to you as soon as possible.");

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2018 12:45 PM
Wow, that simple? I was unaware that I could just put it in the midst of the line like that.
Thank you Joel!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2018 12:38 PM
Try this
//Script for notification to caller that Email was received
(function runMailScript(current, template, email, email_action, event) {
template.print('<p><font size="5" color="#808080" face="Calibri"><strong>');
template.print("Greetings " + current.caller.first_name +",");
template.print('</strong></font></p>');
template.print('<p><i><font size="3" color="#808080" face="Calibri"><strong>');
template.print("Your message for IT Support: " + current.short_description + " has been received. We will respond to you as soon as possible.");
template.print('</strong></font></i></p>');
})(current, template, email, email_action, event);
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2018 03:30 PM
If you can, reconsider the approach of hard coding all that text into a mail script. Such basic modifications should never require updating scripts. Some of our emails are 100s of lines of text and the code is precisley one line of code.