petercawdron
Kilo Guru

There are times where you want a field style to appear in a list view (such as with a red dot beside a value), but not on the actual form when it opens (because it would look like a web site from the 90s).

In this example, the short description will have a red dot beside it when viewed in a list, but when the form opens it will appear normally (without the entire field being turned fire engine red)

To do this, you need to add a function to identify which page is currently in use... 

find_real_file.png

Simply replace add this function after your regular field style.

javascript:current.urgency==1 && (function(){var thisURI = gs.action.getGlideURI().toString(); return thisURI.indexOf('_list.do')!=-1})()
Comments
JosephW1
Tera Guru

Thank you for sharing your knowledge Peter! UI16 separated styles on a list/form basis, now Field Styles only format list fields whereas you can use client scripts to format form fields. So the function you mentioned might not be necessary for users using UI16. Still, that function could be useful for those not on UI16. Thanks again!

Kind Regards,
Joseph

Version history
Last update:
‎06-05-2019 06:46 PM
Updated by: