How to hide 'Cascaded Variables' from Service Portal 'Describe Needs Srceen'?

henrikloman
Giga Contributor

Hi Community,

I have an Service catalog order-guide that consist of 6 Catalog Items. As each of them need to capture the name of the person the Item is for I have cascaded the 'Variable' for this question so that the requester only need to populate this question in the guide once (then is automatically copied to the duplicate variables in the items).

Question: How do I hide these duplicated variables in the  Service Portal (as no longer a need for the User to see them)?.

Product documentation tells me to do the below:

------------------

To hide duplicate variables on all screens after the initial Describe Needs screen in Service Portal, use the isOrderGuide() API.

Example:

if(g_service_catalog.isOrderGuide())
       g_form.setDisplay(‘variable_name’, false);

----------

Not sure though where in the system I actually add or amend this?

Does anyone know?:)

Thanks,

Henrik

 

7 REPLIES 7

Hi Amit,

Thanks for your response - Almost there,

The onLoad catalog client script below is to hide it from Service Catalog view:

 

functiononLoad(){var item= $("current_item");var guide = $("sysparm_guide");if(item!=null&& guide !=null&&item.value== guide.value)return;
    g_form.setDisplay('YOUR_VARIABLE_NAME',false);}

I only need to hide it from the Service Portal view and apparently this is done by using a 'isOrderGuide() API':

if(g_service_catalog.isOrderGuide())
       g_form.setDisplay(‘variable_name’, false);

Do you know where I would add this 'isOrderGuide() API?

Thanks Amit!!
 

Hi Ya,

I know this is a slightly older post but please take a look at my solution provided at the following link.

Hide Cascading Variables

I think this information will solve your issue.

Let me know if this worked for you.

Brent

P.S. If my suggestion helped then please mark as helpful and/or correct so other community members can benefit from this information.

This solved the need, and without scripting, Thank youuu