how do you show/ hide a formatter on form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2017 12:39 PM
how do you show/ hide a formatter on form

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2017 12:44 PM
UI formatter in not a field so setVisible or setDisplay method will not work.
You will have to try out DOM level manupulation.
You can use the $ selector to element ID and hide it using DOM methods when particular condition is met.
How to hide/show an UI action on field changes
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2017 12:14 AM
Hi,
What is the requirement to show/hide the formatter.
If it is view based then you can have different views and in the form layout add/remove the ui formatter.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-20-2017 03:00 AM
I have Created one attachment by using UI formatter. i have to hide/show the attachment button based drop down value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2017 12:18 AM
Hi,
You can try displaying the formatter under a particular section on the form and using client script you can hide/display the section.
Thanks,
Tamoghna