Highlighted
Absent Member.. Absent Member..
Absent Member..
471 views

Replace Urgency number with eqivalent word in Notification

Jump to solution

We use a Global list to provide a pick list in our Interactions to select the Urgency (severity).  So although the user picks Critical, High, Medium or Low in the form, in the Incidents table, the severity is stored as a number (1, 2, 3 or 4).

 

When the notification for a new Interaction goes out, the field for Severity is listed and the customer sees a number.  I would like to replace that number with the corresponding word.  I have tried setting the Caption Condition, and leave input blank, but I have had no success.  This is the line I am using:

 

[severity]?"1", "2", "3", "4":"Critical", "High", "Medium", "Low", "None"

 

Is there a better way (maybe in the format control)?  It does not seem to be reading the Severity value at the time the Notification is generated.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Replace Urgency number with eqivalent word in Notification

Jump to solution

I refined Jacobs nice suggestion to this and it seemed to work for me for both Create New Interaction as well as looking at existing Interactions.

if (not  (null(severity in $file))) then ($L.urgency.pos=index(severity in $file, $G.urgency);$custom.urgency=$L.urgency.pos in $G.urgency.disp)

I switched from $L.pos to $L.urgency.pos to avoid colliding with any existing RAD variable since it is common variable name used internally.

View solution in original post

4 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: Replace Urgency number with eqivalent word in Notification

Jump to solution

What version of HPSM are you using?  And are you using the HTML notifications, or just the regular Form Designer notifications?

 

If you're using the regular Form Designer, you can set a variable value in the master formatctrl (like the probsummary formatctrl record) and set the value based on the global list...  OOB, there is a global list called 'Urgency' that stores the value list and display list of the urgency values.  

 

So you could set something like, on the calculations tab:

Calculations -

Update: true

Calculation: $L.pos = index(severity in $file, $G.urgency);$custom.urgency=$L.pos in $G.urgency.disp

 

Then, in your notification form, set the input of the field you're putting in your email to $custom.urgency

 

 

If you're using the HTML based email, you can get the value by doing something similar in the Expressions tab of the htmltemplate record.

 

var UrgencyArray = vars.$G_urgency;

var pos = UrgencyArray.indexOf($RECORD.severity);

var Urgency = vars.$G_urgency_disp[pos];

 

then you can use the variable 'Urgency' in the HTML notification

Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Replace Urgency number with eqivalent word in Notification

Jump to solution

Jacob,

 

Thank you for the help.  I tried you solution, but it didn't work as expected.  Actually, I don't get anything in the field on the form that is sent as part of the notification.  I did find that if I put 'true' in the Display column of the format control, it works.  Unfortunately, when doing that, I get errors when I tried to create a new Interaction (i put your calculation in the incidents FC since we are sending these notifications out for Interactions).

Do you have any more help you (or anyone) can offer?

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Replace Urgency number with eqivalent word in Notification

Jump to solution

I refined Jacobs nice suggestion to this and it seemed to work for me for both Create New Interaction as well as looking at existing Interactions.

if (not  (null(severity in $file))) then ($L.urgency.pos=index(severity in $file, $G.urgency);$custom.urgency=$L.urgency.pos in $G.urgency.disp)

I switched from $L.pos to $L.urgency.pos to avoid colliding with any existing RAD variable since it is common variable name used internally.

View solution in original post

Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Replace Urgency number with eqivalent word in Notification

Jump to solution

Thank you, 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.