How to control list view field color attributes based on Priority of the record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 06:44 PM
On the HR list layout we see the SLA (percent) color coded bar, this field is a percent_type field with the attributes to control colors in varying percentages.
My requirement is to have a different set of color scheme for different type of priority/SLA.
For example the High Priority 25% should be orange and the Critical should be Red on 25%
Is this possible in the list view? And how can we do this?
Any answers/advise is appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 07:29 PM
Hi Kris,
Take a look at Field Styles.
Defining Field Styles - ServiceNow Wiki
For the "value" field, you can put in a scripted result like this:
javascript:colorCheck(current);
and create a script include that calculates a true/false value. Here's a recent example I helped someone on.
Trying to get Red Dot next to Incident in My Work if it is a Parent Incident
For your case, you are going to need a new field style for each color you want, but should be able to call the same colorCheck() function to determine which ones to turn on and off.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2016 07:56 PM
Thank you Chuck. I will try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2016 10:23 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2016 03:20 AM
Thank you Kris for the kind words.
Attributes are not dynamically settable for percentage complete. My dynamic solution was for the Priority field, not the values in the SLA percentage field. Sorry for the confusion.