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

DrewW
Mega Sage
Mega Sage

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?

12 REPLIES 12

Brian O_Donnell
Tera Guru

I know this isn't really a brand new topic, but I was having the same problem and wanted to pass on how I solved it since I couldn't find an answer anywhere else:

 

javascript:gs.getUrlOnStack().toString().indexOf('_list.do') > 0 && ...

 

 

Better late then never 🙂

I wasn't able to get it working in my case but this post did lead me on the right path. i used the javascript below.

So far in my testing it will show the field style on the incident list only and not on the form if the record has been flagged as a VIP (column).

javascript:current.company.u_vip_account== true && gs.action.getGlideURI().toString().indexOf('incident.do') < 0

neilpetertuffs
Tera Contributor

Thanks, Fantastic!

I can now have a icon/gif on the list to show there is further information (using two style entries images {add_circle.gif|16square.gif}) and have the form show the actual data!

Regards, Neil.