How do you hide a section in a catalogue item (via catalog client script)

stevemac
Tera Guru

Geneva Patch 6. Using item designer with catalog client scripts

Have a catalog item consisting of 2 sections.   Need to hide one of the sections.   It is labelled 'Deploy and Recovery'

I have tried using the following in a catalogue client script.

g_form.setSectionDisplay("deploy_andrecovery", false);

This causes the catalog client script to not execute.   Commenting it out ensure the script executes correctly

In the interim I am hiding all the variables in the section.   The problem with this is  that it leaves the section label  (Deploy and Recovery) visible on the form.

I do not have much experience in debugging client scripts & until now how not done much work with catalog client scripts.

Appreciate if anyone can confirm that g_form.setSectionDisplay works in a catalog client script and any recommendations on how to hide a section on a catalog item

 

thanks,

Steve

1 ACCEPTED SOLUTION

Sections and containers are different. The form tabs that you see on a table (incident.change,etc) are sections. The section like partition that you see on a service catalog is either a container, variable set or a label type field. Verify what is the type of field by right clicking and opening it's definition.



You should be able to hide them using g_form.setDisplay('name',false);


View solution in original post

8 REPLIES 8

Working OK in an onLoad client script against the incident form



So any ideas on how to hide a catalog item section via a catalog client script?


Can you share a screenshot of the issue of the Catalog Item and of your Script?



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Sections and containers are different. The form tabs that you see on a table (incident.change,etc) are sections. The section like partition that you see on a service catalog is either a container, variable set or a label type field. Verify what is the type of field by right clicking and opening it's definition.



You should be able to hide them using g_form.setDisplay('name',false);


thankyou - it was a container.   Section can be hidden as desired



cheers,



Steve