incident email notification priority

sureshp89882164
Tera Contributor

Need solution for the incident email notification template priority should be display as like value(1,2,3) instead of display as label(1-Critical, 2-High, 3-Moderate).

9 REPLIES 9

using in MIM SMS notification template. And this template is part of email notification(communications).

@sureshp89882164 

if email script is supported there then it's feasible.

if you can use scripting then it's feasible

If not then it's not possible to achieve

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Please find the below one MIM SMS template

Chetan Mahajan
Kilo Sage
Kilo Sage

Hello @sureshp89882164 ,

                        You can try the below logic in your email script and call it in your notification. If both the Label and Value are the same. and you want to print it like (1,2,3)

 

// Get the display value of priority
var priorityDisplayValue = current.priority.getDisplayValue();

// Declare a temporary variable for the priority number
var incPriority;

// Use if-else to check display value and set the appropriate numerical value
if (priorityDisplayValue == "1 - Critical") {
    incPriority = 1;
} else if (priorityDisplayValue == "2 - High") {
    incPriority = 2;
} else if (priorityDisplayValue == "3 - Moderate") {
    incPriority = 3;
}  else {
    // Default value or handle unexpected priority
    incPriority = "N/A";
}

// Add the incPriority variable to the email template model where you want to use it
template.print(incPriority);

 

Kindly mark correct and helpful, if applicable.  

Hi Chetan,

Unfortunately this email script is not working.

Actually i am using the template is Major incident SMS notify template. This email script is not working in the template.