- 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
08-19-2016 01:11 PM
Bonjour Monsieur Hofing,
You'll want to leverage Field Styles: Defining Field Styles - ServiceNow Wiki
There's lots of great examples on the platform already in the field style list.
- 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
08-22-2016 06:21 AM
Thank you, Robert and Ben, that answered my question perfectly!
Ric
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2019 09:24 AM
Hello, I have a similar case use and I have applied your code concept but without success.
What I am trying to accomplish is when Business criticality is a 1 then make the background color red (tomato).
Please take a look and let me know if you can see what I am missing or doing wrong, thank you!