How to hide process flow stages based on specific field conditions on the table?

Shantharao
Kilo Sage

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? 

find_real_file.png

 

Thanks in advance for the response. 

 

17 REPLIES 17

Tanushree Doiph
Mega Guru

Hey,

Goto process flow, create new and add condition in condition

find_real_file.png

Please mark my answer corret and helpful.

Thanks

Tanushree

 

Anil Shewale
Mega Guru

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

https://community.servicenow.com/community?id=community_question&sys_id=a7df07a5dbdcdbc01dcaf3231f96...

 

If it help mark helpful or correct 

Thanks and regards

Anil

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();

 

}

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader