37 views

Symptoms


After setting g_form.setSectionDisplay function to 'false' in client script, it does not hide the form section on page load.

g_form.setSectionDisplay('<section_name>', false);

Release


All releases 

Cause


One of the causes of the setSectionDisplay function not working properly is how the section name is used within the function.

 

Resolution


As per the documentation on setSectionDisplay, the 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.

 

Additional Information


https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_reference/GlideForm/concept/c_GlideFormAPI.html

https://docs.servicenow.com/bundle/kingston-application-development/page/app-store/dev_portal/API_reference/GlideForm/concept/c_GlideFormAPI.html#ariaid-title53

Article Information

Last Updated:2018-08-27 14:51:33
Published:2018-08-27