Change the color of the priority filed when it is changed to high priority

poornima batchu
Tera Expert

hi everyone, 

I'm trying to figure out how we can set the color code of a field like when the priority is changed to high. Is there a possible way to show the field in different color. My requirement is to set a color code for priority field to orange when it changed to 2-high in the workspace.find_real_file.png

2 REPLIES 2

Sean Walters
Tera Expert

Hi Poornima, 

Field styles allow you to declare individual CSS styles for a field in a list or form.

About this task

The CSS lets you change the following attributes of a field.
  • Change the color.
  • Change the font attributes (bold, italics, underline).
  • Change the padding and alignment of text.

You can define field styles for tables and database views that are in the same scope as the field style and for other tables that have at least one field in the same scope as the field style. Field styles defined for a table do not apply to database views that include the table. Create separate field styles for database views.

If this is what you require you can view this link that explains how to implement it , and it is fairly simple. 

https://docs.servicenow.com/en-US/bundle/sandiego-platform-administration/page/administer/navigation-and-ui/task/t_DefineFieldStyles.html

Please mark my answer correct and helpful if this resolves your issue.

User531964
Mega Sage

The screenshot looks like HR Workspace.

Check this answer

In a nutshell: workspaces are made on the UI framework which doesn't allow the DOM manipulation or the style changes .

If you are using the legacy workspace, an alternative is to use Highlight list fields and Highlight values in the form header.