- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 02:01 PM
Hi,
I am trying to set the background of a field to blue if the user has more than 1 PC assigned to them. I believe my script include is setup properly since it worked when running it in Background-Script, I think I just need to adjust "if(javascript:countAssignedTo(current.u_itd_customer))>1;". Anyone know how I need to adjust this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2020 11:43 AM
kindly have a look on below article. it has mentioned the details.
https://www.servicenowelite.com/blog/2013/11/24/custom-field-styles

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 02:05 PM
try now
javascript:countAssignedTo(current.u_itd_customer)>1

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2020 02:09 PM
you dont need to use if() in value field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2020 10:41 AM
Hi, I tried that and still doesn't work for me. I have even tried 'javascript:1>0' just to test and it still isn't triggering my style rule.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2020 11:10 AM
just confirming here.
how are you testing it ? because when you apply some condition on "value" field then field style will be applicable for list view.
condition which i had suggested is correct and it will work. please confirm where are you testing it ? on list or form ?