Configuring Styles for a Particular Field

preethiraokn
Kilo Explorer

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

find_real_file.png

Regards
Preethi

14 REPLIES 14

Harsh Vardhan
Giga Patron

try now



javascript:gs.nowDateTime()<current.u_glide_date_time_60.getDisplayValue()


Shishir Srivast
Mega Sage

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


preethiraokn
Kilo Explorer

Hi Harsh Vardhan,



Thanks for your inputs


As suggested changed the value but no luck 😞


find_real_file.png


Status Indicator did not get updated with any style.


find_real_file.png


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



ValueThe 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