color incident field based on SLA/Aging

bijender1
Tera Contributor

Hi All,

We have a SLA running on our Servicenow, but there is no color coding in the incident field( color coding is on Priority field ).

Can we color Incident field based on SLA and the aging ?

19 REPLIES 19

Chuck Tomasi
Tera Patron

You can do this with some scripting - I recommend a business rule on the task_sla table that keeps a field of your own (or perhaps an existing field on incident) updated. Then use a field style on that field.



The trick is going to become when you have multiple SLAs against the same record. Perhaps one on the assignment group and one on the CI. They could have different agreements, which means a single field on the incident form cannot accurately represent what is happening.



https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/administer/navigation-and-ui/tas...


bijender1
Tera Contributor

Hi Chuck,



Thanks, Frankly if anything comes to Script, i am not an expert,


If possible can you guide me through this with the help of screenshots( i am using Helsinki )


Hi Bijender,



What is the underlying requirement here? If it is so people can see which incidents have breached SLAs, consider using a report on the task_sla table. There may even be one OOB. If not, it wouldn't take long to create one.



If I can understand what the requirement is, it will help arrive at the proper solution rather than writing you a script that you don't understand and may find difficult to maintain going forward.



http://xyproblem.info/


bijender1
Tera Contributor

Hi Chuck,


The Requirement is when a ticket comes in service-now, the incident field color should be like green, and after this as per the aging the color of the incident changes ( like orange / red).



like below:


find_real_file.png