Configuring Styles for a Particular Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 10:06 PM
Hi ,
Requirement is need to configure Styles for Status Indicator field based on condition.
The condition is ,If current date < Expected closure date , the field by the name status indicator should be green
We defined by writing the value but it is not wokring
Script was javascript:gs.nowDateTime()<current.u_glide_date_time_60
Regards
Preethi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 10:26 PM
try now
javascript:gs.nowDateTime()<current.u_glide_date_time_60.getDisplayValue()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 10:30 PM
Can you please try with dateDiff() function to compare the date and try.
javascript:gs.dateDiff(gs.nowDateTime(), current.u_glide_date_time_60, true) <= 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 11:10 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2017 11:16 PM
if you are passing some condition in value field the field style will work on list view.
check the result on list level.
write <table name>.list in application navigator . eg: incident.list
Value | The matching value of the field for applying the style. Note: Field styles based on value only work on lists. To apply field styles on both the field and the form, leave this field blank. |
http://wiki.servicenow.com/index.php?title=Defining_Field_Styles#gsc.tab=0