- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2025 06:46 AM
Hi,
I am configuring some email notifications and the priority shows with a word next to the priority number, for example, when adding ${priority} to the email subject line, it displays in the email as 'Priority 4 - Low'. I would like it to show only as 'Priority 4' or 'P4' instead of showing 'Low' on the end. Is there a way to amend this to only show the number rather than the wording?
Thank you
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2025 05:19 AM
You can't add the mail script to the subject line, but you can set the subject line within the mail script. You would do it something like this:
var str = 'Your subject';
email.setSubject(str);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2025 07:13 AM
You will have to use a mail script to do that. In the notification, where you want the priority to print, you would put this:
${mail_script:priority_format}
Then create a mail script named priority_format that has the following code:
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
template.print('P' + current.priority.getValue().toString());
})(current, template, email, email_action, event);
You can modify it to suit however you want it to print out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2025 01:51 AM
Hi Jennifer,
This is really useful thank you. Is there a way I can add this to the subject line as well as the body?
Thank you

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2025 05:19 AM
You can't add the mail script to the subject line, but you can set the subject line within the mail script. You would do it something like this:
var str = 'Your subject';
email.setSubject(str);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2025 04:25 AM
Thank you!