g_form.setSectionDisplay("sectionName", false) is not hiding section's labels in service portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2018 08:28 PM
Issue :
using g_form.setSectionDisplay("sectionName", false) is not hiding section's labels in service portal.
Sections are getting hidden but section's label still visible .
Any help pointers ?
Dose any one know solution for this issue?
I am working on Jakarta.
PFA for detail.
referred : Hide Sections on Service Portal ,but didn't work out.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2018 08:43 PM
following the post provided by you, it seems it doesn't work in Jakarta.
But as per the product documentation: setSectionDisplay() is a supported client API: Service Portal and client scripts
- setSectionDisplay(sectionName, isVisible)
Note: g_form as a global object cannot be used in a widget client controller or in a UI script.
Where are you using the above function. if it's a client script then have you marked the UI Type to All?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2018 09:00 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2018 09:12 PM
can you try with below script.
var sections = g_form.getSections();
sections[4].style.display = 'none'; //index of section kindly check on which index your section has
}
if this does not work
kindly refer the thread below.
Get a form section by name in Fuji
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2018 09:15 PM
Hi Harsh ,
I had tried getSections() , but it throws "undefined "error on PORTAL .
getSections() working fine on the form level but in PORTAL its not working as well