- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2016 01:06 PM
I have a requirement to change the color of the text in a field based on the value in another, related field. In this case it is the software license user entitlement. I want to display the user name in red if the user has a non active state. For example, in the screen shot below, if Abel's Active status is false, I want to display his name in the User Entitlement list in red.
Thanks!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2016 02:31 PM
Ric,
I was unable to get the color of the text to change to red. I think that may be related to the fact that this is a link, but you can change the background color. Here's what I did:
Navigate to Asset > Software > User License Entitlements.
Right-click any column header and select Configure > All.
Go to the Styles tab. (this is what Robert references in the wiki).
Complete the form as follows:
This has the following result in the list view for inactive users:
If you would like it to be a bit more "in your face," you can turn off "Modern cell coloring" in the list preferences. This is a per user setting, though. It makes this look like this:
I hope this helps.
Ben

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 09:36 AM
Hi Cory,
You have an extra cmdb_ci_service in your javascript. Your value should just be:
javascript:current.busines_criticality == '1 - most critical';
current in this cas is the cmdb_ci_service table. You only need to get the field value. In the example, above, we needed to dot-walk to get a value from a related table.
Ben
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 09:55 AM
That worked!
Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 10:01 AM
You're welcome!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 10:32 AM
I do have one more question: It works on the Business service list view, however it does not work where I thought it would; on the Incident form.
So what I did next is to add Style to the Incident form (see below) but it did not work...
I should add that where I am ULTIMATELY going with this is the Status page on the Service Portal
any help will be greatly appreciated, thank you!