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-04-2017 03:40 AM
Hi Preethi,
Just wanted to confirm : What is the field type of Status indicator..
Please check Defining Field Styles - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 09:43 PM
Hi Midhun,
The field type of Status Indicator is String
Regards
Preethi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2017 10:47 PM
Hi Preethi,
have you checked my last response ? let me know if it did not help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2017 04:31 AM
Hi Harsh,
As suggested updated all the details but did not work in list view nor form:-(
Thanks and regards
Preethi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2017 06:31 AM
Hi Preethi,
If you want to just highlight use Flash method of g_form GlideForm class. It will blink for 2 to 3 seconds in the form layout.
For list layout I used the same field (date field which we need to validate). It works fine for me.
value: javascript:var answer= gs.dateDiff(gs.now(), current.u_end_date.getDisplayValue(), true) < 0; answer;
Enjoy:)