Service Portal: toggle variable containers

bigbacon
Giga Guru

It looks like this is not an option for forms on the service portal. 

 

What alternative is there for easily hiding/showing blocks of variables without just having to keep track of setting visibility for each and every control on the form?

1 ACCEPTED SOLUTION

By adding one Catalog UI Policy Action for the Container Start variable, every variable in the container is made not mandatory and hidden in this case.  This is working for me in Service Portal and the native UI.

View solution in original post

8 REPLIES 8

Brad Bowman
Kilo Patron
Kilo Patron

You can specify the container start variable in a Catalog UI Policy Action with Visible = False to conditionally hide the container.  In a Catalog Client Script you can use a line like

	toggleVariableContainer('87419ff0db872300262950a45e961996', false);   

using the sys_id of the Container Start variable.

this does not work when looking at the form on the service portal.

 

Alternatively is there a way to ALWAYS push the user to the non-service portal version of a form?

It looks like the Catalog Client Script approach isn't supported in Service Portal, but the Catalog UI Policy works.  If you have any mandatory variables, also set that to False in the Catalog UI Policy Action.  You can't display a non-portal form in portal, but can link to the native UI form directly from elsewhere.

catalog client scripts do work in portal but there seems to be some limitations. 

 

I was trying to close the containers through a UI policy but using script code in that policy.

 

what is the best way to achieve this in form on the service portal?