How to hide process flow stages based on specific field conditions on the table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2020 04:36 AM
Hello All,
I have a process flow formatter as below,
I have a true/false checkbox field on the form based on this field I have to hide/show two more stages on to this table formatter in between the existing stages, is it possible?
Thanks in advance for the response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2020 04:51 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2020 04:53 AM
Hi
creating a UI policy and when state is say assignment group service desk in this case
Add code in run script of UI policy (index number of the stages which you want to hide)
function onCondition() {
$$('.disabled')[4].hide();
$$('.disabled')[5].hide();
}
refer the following link for more detail
If it help mark helpful or correct
Thanks and regards
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2020 07:18 PM
Hi Anil,
Thanks for the response, I have created UI policy and placed below code but no luck, do you any idea other than this.
function onCondition() {
$$('.disabled')[4].hide();
$$('.disabled')[5].hide();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2020 05:41 AM
Hi Shantharo,
please use below script in your UI policy and it would hide that
it would be difficult to use the html element for the class as disabled; you can better search with anchor tag
Ensure in your UI policy you set Isolate Script field as false; this field you can set to false form list view of UI policies as this is not available on form
give here the text for the formatter
$$("a:contains('Initial/Draft')").hide();
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader