Field Style in reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I would like a paperclip icon to be displayed in the request_item field of the sc_task table when a file is attached to the record set in the Request item.
To meet this requirement, I set the Filed Style as shown below.
However, while the icon appears in the list view, it does not appear on the form.
How can I apply this style to the form view?
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @MiY ,
field styles that rely on dynamic conditions (e.g using javascript in the Value field) do not apply on form layouts, even if they work fine in list views. To have the style show up in forms, you’d need to hard code the style without dynamic logic....
You can use a Client Script along with the g_form.addDecoration() API to programmatically add an icon to the field..
If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.
Kaushal Kumar Jha - ServiceNow Consultant - Lets connect on Linkedin: https://www.linkedin.com/in/kaushalkrjha/