How do i change field label color and style?

OJ1
Kilo Explorer

How do i change field label color and style?

5 REPLIES 5

Tony Chatfield1
Kilo Patron

Hi, from the UI context menu (right click) on list or form view you can select
Configure > All
and then select the 'Styles' tab  or navigate to sys_ui_style table from the Menu
System UI > Field Styles

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

OJ1
Kilo Explorer

Thanks for your response but the solution did not work.

Hi, you may want to review your question\post and provide clear and specific details of your configuration, what you are trying to do and why using the documented functionality 'does not work' ? Otherwise the forum can only guess at your issue(s)

shloke04
Kilo Patron

Hi,

You can write an on load client script on the table you want like for example "incident" and use the script below:

function onLoad() {
    //Type appropriate comment here, and begin script below
    var labelcolor = g_form.getLabel('incident.close_code'); // Replace "incident" with your table name and "close_code" with your field name
    labelcolor.style.color = 'red';
  }

find_real_file.png

Result:

find_real_file.png

Also if this does not work then refer the links below which you should try to get you to a solution:

https://community.servicenow.com/community?id=community_question&sys_id=0b02ac07dbdac010feb1a851ca961914

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke