How to hide a section using a UI Policy

Tracey Wilmot
Tera Contributor

Hi all,

I've created a new section on the Application form for 'Cloud Service'.  If the 'Type' is selected as Cloud Service, the new tab 'Cloud Service' should appear:

TraceyWilmot_0-1665506973681.png

I would like to achieve this with a UI Policy but I can't get it to work:

TraceyWilmot_1-1665507112538.pngTraceyWilmot_2-1665507153119.png

Any ideas, greatly appreciated 🙂

 

1 ACCEPTED SOLUTION

Mike_R
Kilo Patron
Kilo Patron

in your script, try 'cloud_service' (lower case)

 

 

sectionNameStringThe section name is lower case with an underscore replacing the first space in the name, and with the remaining spaces being removed, for example "Section Four is Here" becomes "section_fourishere". Other non-alphanumeric characters, such as ampersand (&), are removed. Section names can be found by using the getSectionNames() method.

 

View solution in original post

5 REPLIES 5

Mike_R
Kilo Patron
Kilo Patron

in your script, try 'cloud_service' (lower case)

 

 

sectionNameStringThe section name is lower case with an underscore replacing the first space in the name, and with the remaining spaces being removed, for example "Section Four is Here" becomes "section_fourishere". Other non-alphanumeric characters, such as ampersand (&), are removed. Section names can be found by using the getSectionNames() method.

 

thomaskennedy
Tera Guru

Print out g_form.getSections() or getSectionNames().

Sagar Pagar
Tera Patron

Hi @Tracey Wilmot,

 

Make sure there is no mandatory fields in the sections and add sections back-end name only.

 

Thanks,
Sagar Pagar

The world works with ServiceNow

TR5
Tera Contributor

hello @Sagar Pagar can you please tell me how hide sections which contains mandatory fields also