How do I add a style for a list view only?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2009 11:52 AM
I found this today and I like the idea
http://wiki.service-now.com/index.php?title=Indicating_Updated_Tickets
But my issue is I only want it to display on the list. Does anyone know of a way to detect what the user is viewing so I can add to the condition?
- Labels:
-
Orchestration (ITOM)
-
Service Mapping

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 01:41 AM
Thank you for your quick reply! Do you call the functions incident_listGetViewName and incidentGetViewName somewhere because I do always get a null value for isListView? That's why I still get the Icon in both, List and Form because the condition is always true.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 11:47 AM
The system calls the function on its own, that's why the function names are important. I do know that over the years we have had issues with what you are talking about but the current code above is working just fine.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2015 12:32 PM
Might it be a topic of different ServiceNow Versions? Nevertheless, I managed to solve the topic now with a combination of the Business Rule and the View Name. This should be sufficient at the moment. Thanks a lot for your assistance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-01-2015 07:26 AM
Hi Markus,
I am trying to get a style work in list view but it works in both list and form. Can you share the script you have and changes you made to get it working. Is the script global if not is it running on display?
Regards,
SR

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2015 01:14 AM
Hi Shakti,
sorry for the late reply! I handled it with the System UI > Field Style only.
Here I entered the following line in the Value field of the Field Style:
javascript:current.u_update_flag == true && RP.getParameterValue('sysparm_view') != "ess"
u_update_flag is a custom field. For me it was necessary the Field Style is not used in the ess view, that's why I exclude it this way.
Best regards,
Markus