- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 12:29 PM
hello,
Appreciate your help in advance.
I'm trying to color band a variable "Priority" that is included in the email message script.
Depending on Low, high medium, I need to color band only teh Priority varble.
Could you please help me with the script.
var PriorityIs=${sysapproval.priority}
if (PriorityIs="medium")
{
Priority: ${sysapproval.priority} // Color should be orange
}else if
{
if (PriorityIs="high")
Priority: ${sysapproval.priority} // Color should be Red
}
I tried the below code, but not seeing teh color:
var PriorityIs=${sysapproval.priority}
if (PriorityIs="medium")
{
<span style='color:orange'>Priority: ${sysapproval.priority} </span> // Color should be orange
}else if
{
if (PriorityIs="high")
<span style='color:red'>Priority: ${sysapproval.priority} </span> // Color should be red
}
Please help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 01:01 PM
Hi @Shree Nag
Consider this solution
var priority = current.priority + "";
var coloredPriority = "";
if (priority == "3") { // Medium
coloredPriority = "<span style='color:orange;'>Priority: " + priority + "</span>";
} else if (priority == "1") { // High
coloredPriority = "<span style='color:red;'>Priority: " + priority + "</span>";
} else {
coloredPriority = "Priority: " + priority;
}
email.body = email.body.replace("${priority_placeholder}", coloredPriority);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2025 01:01 PM
Hi @Shree Nag
Consider this solution
var priority = current.priority + "";
var coloredPriority = "";
if (priority == "3") { // Medium
coloredPriority = "<span style='color:orange;'>Priority: " + priority + "</span>";
} else if (priority == "1") { // High
coloredPriority = "<span style='color:red;'>Priority: " + priority + "</span>";
} else {
coloredPriority = "Priority: " + priority;
}
email.body = email.body.replace("${priority_placeholder}", coloredPriority);