Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Hide Process Flow State on Change Form

Dazler
Mega Sage

Hi,

I am wanting to hide certain states on the process flow based on the Change Model.  For example, here in our company we have information changes, that does not require approvals.  I want to hide the Assess, Authorize, Scheduled, and Implementation states on the process flow.

find_real_file.png

I did find an old example of this, 10 years ago example.  It said to add a new field with a type set as a condition to the sys_process_flow table, but there is already a condition field there.

It seems like the ui macro is where I would need to make that condition fit, but I am unsure of where in ui macro script would I incorporate the condition.

Any help would be appreciated.

1 ACCEPTED SOLUTION

Dazler
Mega Sage

I found the answer.  I ended up creating a UI Policy and making sure that the Isolate Script was set to false, then I added the following to the script and it worked.

$j("a:contains('Assess')").hide();
$j("a:contains('Authorize')").hide();
$j("a:contains('Scheduled')").hide();
$j("a:contains('Implement')").hide();

View solution in original post

7 REPLIES 7

sachin_namjoshi
Kilo Patron
Kilo Patron

You can add conditions in your process flow configuration to show, hide each process flow stage.

find_real_file.png

Regards,

Sachin

Hi @sachin.namjoshi 

I did add conditions to the process flow configuration, but it did not hide it on the form.

Jaspal Singh
Mega Patron
Mega Patron

Haven't tried but look for link &  comments from Ajay