How to change table cell colors based on record values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
51m ago
Hello,
I am trying to alter the colors within a cell on a module table based on the values on that cell. (if the value in the cell shows 5 it turns green, if it is 10 it turns red). In what ways am I able to achieve this? I see methods like GlideRecord to get the data but how do I use that data to determine which cell it's at and recolor said cell in the table upon loading it in ServiceNow.
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2m ago
Hi,
You don't need to use GlideRecord just to identify the cell currently being rendered. The approach depends on how the module table is implemented.
If this is a standard ServiceNow list, check Configure > List Layout and the available field-style configuration. You can define styles based on field values where supported.
If this is a custom Fluent UI table, retrieve the record values and apply conditional CSS styling in the cell-rendering logic. For example, check the cell value and assign a green background for 5 and red for 10.
Could you confirm whether this is a standard platform list or a custom table developed using Fluent UI? The implementation will differ.
NOTE: GlideRecord retrieves server-side records; it does not identify or style rendered browser cells by itself. The exact implementation depends on the UI being used.
Helpful? Please mark the response as Accepted Solution ✅ and close the thread — this helps future readers find the solution faster.
Regards,
Sachinvic
✨ ArchX Certified | ✨ 16x ServiceNow AI MVP
