How to highlight requestor name in red color if VIP is true and adding the vip icon on the top bar?

alt
Tera Contributor

AngelynTumbaga_0-1718003060852.png

 

7 REPLIES 7

Yashsvi
Kilo Sage

Hi @alt,

Please try this below code:

var callerField = g_form.getReference('caller_id', function(caller) {
    if (caller && caller.vip === 'true') {
        var labelElement = document.getElementById('label.incident.caller_id');
        if (labelElement) {
            labelElement.style.color = 'red';
        } else {
            console.error('Label element not found.');
        }
    } else {
        console.error('Caller is not a VIP or reference not found.');
    }
});

 

Thank you, please make helpful if you accept the solution.

alt
Tera Contributor

its working in the ui view but not in the workspace

NoBert
Tera Contributor

Hi @alt ,

To add highlighting to a filed in SOW go to All > Workspace Experience > Administration > Highlighted Values and click New. Fill in the fields for Table and Field the value should be highlighting for and save the record.

On the Highlighted Value Condition tab click New.

Enter the condition where the field value should be highlighted.

Choose a Color from the list. With the Variant field you can set the color’s characteristic as primary, secondary, or tertiary.

 

To mark the an incident's caller as VIP it should look like this:

NoBert_0-1718264736143.png

 

Please mark it as helpful if you accept my solution.

Thank you!