
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2017 06:53 AM
I read (in full) Show/Hide Form Section by Name - ServiceNow Guru
So... when using g_form.setSectionDisplay(), where do you define the section name????
What field on the sys_ui_section will go in the first parameter of g_form.setSectionDisplay() ???
I tried the following:
But it doesn't work.
Solved! Go to Solution.
- 38,546 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2017 07:16 AM
This is not correct. Naming conevtion is as follows
"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."

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2017 07:26 AM
g_form.setSectionDisplay('hardware_serialnumbersandassettags', false);
Worked!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2018 06:39 AM
I added the following to an onLoad client script to get the exact names:
var sections = g_form.getSectionNames();
alert(sections);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2021 06:29 PM
Hi
However the above method cannot be used for Related list tabs in a form. Follow this
Create a UI policy
Set no condition -> Save
Go to 'UI Policy Related list action' -> Click New
Select 'the related list tab' that you want to set visible as false and save