Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Condition based field styling

Craig Nicholls
Tera Contributor

Hello Guys,

 

I wonder if you could assist me with something, I have recently created a field on my incident table that contains a date which is auto populated by a business rule when a customer visible comment is added to a the worklog, the field is labelled "u_last_customer_update"

 

I would like to expand the functionality of the field and add a condition based colour scheme to the background of the field.

 

Please could you someone tell me if this is possible and if so how I would go about achieving this. What i would like to happen is the background field will change colour based on the time since the current recorded time saved in the field, I would like the following conditions to be applied:

 

within 24 hours - Green

24-48 hours - Yellow

greater than 48 hours - Red

 

thanks in advance

Craig

 

5 REPLIES 5

Please use the Value field to include your Script Include like below

javascript: new ScriptIncludeName().functionName() == 'true'