Display/Hide Process Flow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2012 07:38 AM
Hi,
I have created a process flow for the Incident table but this only relates to an certain categories of incident.
Does anyone know if there is anyway that I can Display/Hide the process flow. I was hoping to do this by UI Polilcy but it does not appear on the list of fields.
Any help is appreciated.
Thanks
Dan
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2012 05:20 AM
I would build a UI Policy with the proper condition and Run Script set to checked (true). Inspect the HTML of the Process Flow formatter in the top of the form. You should notice a key class that we can use to find these elements using the DOM (hint: class is process_flow). With that information we can find the table that is being rendered to display them and hide it. If you don't want to dig too much, here's the answer.
We can find the elements with the process_flow class and walk up to the table (which is the parent node of the parent node from the TD node that has the process_flow class on it).
Execute if true:
function onCondition() {
try {
$$('.process_flow')[0].parentNode.parentNode.show();
} catch(e) { // catch errors to keep other JS from failing }
}
Execute if false:
function onCondition() {
try {
$$('.process_flow')[0].parentNode.parentNode.hide();
} catch(e) { // catch errors to keep other JS from failing }
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2015 01:11 PM
Any way to do this in Fuji?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2015 04:09 PM
This is available on the share site ServiceNow Share 'Conditional Process Flow Formatter' created by Drew West. It is great and works really well. We are on Fuji Patch 8.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-29-2015 08:33 AM
The "Conditional Process Flow Formatter" was exactly what I was looking for. Thanks!