Replace Urgency number with eqivalent word in Notification

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.

  • 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

  • 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?

  • Verified Answer

    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.

  • Thank you,