Condition based field styling
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 05:08 AM - edited 12-20-2022 05:18 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 05:33 AM - edited 12-20-2022 05:34 AM
Hi Craig,
Under System UI> Field Styles, you can add an entry for your field.
You can create a Script include, if your logic is complex and call that function from your field style value field. Or else, you can directly define your condition inside the value field. Please give it a try. An example:
In your case, you can create 3 entries for each color. You can create a script include and pass your dates into it, then return the color values based on your above condition.
Please mark my answer as helpful/correct depending on its impact.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 09:55 PM
Thanks. We were able to use this to highlight the field based on the date difference as per the below example in System UI >field styles:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2022 10:46 PM
I am glad this was resolved.
Please mark my answer as helpful/correct depending on its impact.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 10:50 AM - edited 10-14-2024 10:50 AM