Color Format for Field on UI Component (Dashboard)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2025 06:42 AM
How to highlight a field based on a condition in the UI Builder component (to be visible on the dashboard).
I have a component on task_sla table which filters by type is incident and incident is active. I want the task field to be coloured (fomatted in some way) so that the desk is aware on what action to take based on color. The condition is:
If business_percentage > 50 && current.business_percentage < 100 then style the task field as Orange.
If business_percentage >= 100 then style the task field as Red.
I have completed the task on the list view of task_sla table. Created 3 styles on this table with value/ condition as:
1. Value - javascript:current.business_percentage > 50 && current.business_percentage < 100
Style - background-color: orange;
2. Value - javascript:current.business_percentage >= 100
Style - background-color: red;
3. Value - javascript:current.task.needs_attention==true
Style - background-color: blue;
This works perfectly on the task_sla list table. The field number changes its colour (see small red and orange circle along with the task number) as per the business percentage as below(used modern colour cell) :
I want the same to be done on the components that can be seen in the dashboard ~ UI Builder. How to do this?