Hide process flow formatter on condition?

shalinikacham
Kilo Expert

Hi all,

Is it possible to hide a UI process flow formatter on a condition say 'if assignment group is HELPDESK then i want to hide Implementation stage. Below are available stages for change request:

find_real_file.png

How can i hide the 3rd stage which is Implementation? Tried editing the flow formatter condition but I see no change. Help anybody?

13 REPLIES 13

Sorry for the confusion. I went back and read the docs. The Condition field isn't about displaying or hiding the stage, it's about highlighting it as the current stage.



From: Process Flow Formatter - ServiceNow Wiki


Use the condition builder to set the conditions under which the formatter stage is highlighted as current. Any field available in the condition builder, such as SLA or Impact, can be used to trigger a process flow stage.



Conditionally hiding or showing a stage does not appear to be possible with supported means.


We did it through 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();


}



dont know its the right way but it served our purpose. Though I understand the purpose of process flow is to show stages in linear way but it also leads to confusion sometimes.


e.g. Leave Rejected is my last step in process flow but when then stage is true it also tick marks leave accepted, leave cancelled which is very confusing if I just look at the process flow bar. I think there should be a flexibility in the platform by default to show / hide the stage if that's irrelevant to process.


FWIW, the process flow formatter started as a customer contribution. It was an entry in the first innovation of the year award contest in 2010. It eventually became a plugin.



What that means is - if you have better idea, create your own "new and improved" process flow formatter and make a name for yourself if you like.


Thanks that worked for me too. I created a UI Policy for each state and toggled the 'disabled' array numbers based on their positions.



Thanks,
Ayman


Harish KM
Kilo Patron
Kilo Patron

There is an app created for that find below



ServiceNow Share


Regards
Harish