How to Change the Background Color for Priority in Incident for specific user only

Sravani47
Tera Contributor

How to Change the Background Color for Priority field in Incident, for specific user only Not for all user

Please find the screenshot 

Sravani47_0-1667027976375.png

Please help me on this

1 ACCEPTED SOLUTION

Sagar Pagar
Tera Patron

Hi @Sravani47,

 

You have to add additional conditions in value field for specific user (using users sys_id) for Field styles.

 

Extra condition will be - && gs.getUserID() =="add_user_sys_id _here"

 

 

For example - 

Table - Incident

Field - Priority

Value - javascript:current.priority == 3 && gs.getUserID() =="add_user_sys_id _here"

Style - color: gold;

 

Note - modify it as per your fields and need.

 

Thanks,
Sagar Pagar

The world works with ServiceNow

View solution in original post

11 REPLIES 11

Hi Murthy,

added condition in value , but it is not working.

Sravani47_0-1667038563231.png

 

Hi @Sravani47 

see below screenshot you need to replace with colon symbol.

MurthyCh_0-1667043163503.png

 

 

Thanks,
Murthy

Hi Murthy,

updated code , but not working.

Sravani47_0-1667045509902.png

 

Sagar Pagar
Tera Patron

Hi @Sravani47,

 

You have to add additional conditions in value field for specific user (using users sys_id) for Field styles.

 

Extra condition will be - && gs.getUserID() =="add_user_sys_id _here"

 

 

For example - 

Table - Incident

Field - Priority

Value - javascript:current.priority == 3 && gs.getUserID() =="add_user_sys_id _here"

Style - color: gold;

 

Note - modify it as per your fields and need.

 

Thanks,
Sagar Pagar

The world works with ServiceNow

Hi Sagar,

I didn't find any Styles for Incident table PFA screen shot

Sravani47_0-1667031939714.png

shall i create new Style