- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2016 06:17 AM
Is it possible to apply a field style to any value of that field and not just a specific value? If I leave the value field blank, the style doesn't apply. If I enter a single value, then it applies but I would like to format the field with the field style all the time. mlockhart
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2016 06:23 AM
Hi Todd,
Have you tried using a javascript in the "value" field, like explained on our wiki? In javascript you can add condition if value is empty (like for example "javascript: current.state == ''", where state is the field), but you'll have to test it.
Defining Field Styles - ServiceNow Wiki
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2016 06:23 AM
Hi Todd,
Have you tried using a javascript in the "value" field, like explained on our wiki? In javascript you can add condition if value is empty (like for example "javascript: current.state == ''", where state is the field), but you'll have to test it.
Defining Field Styles - ServiceNow Wiki
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2016 06:26 AM
Works for me. The field is an integer field so I just set it to javascript: current.u_count > 0; since it's always going to be a positive number. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2016 07:59 AM
How do you get this to work on a calculated field that calculates how long an incident's been open?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2016 08:08 AM
I figured it out. I set it to "javascript:!current.isNil();"