how to hide section in from workspace view

rinathombar
Tera Contributor

hello

 

I want hide policy setup section in policy form

 

if anyone know pls suggest 

6 REPLIES 6

Ankur Bawiskar
Tera Patron

@rinathombar 

you can hide form section using g_form.setSectionDisplay('sectionName', false);

what did you try and what didn't work?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

HarishKumar6668
Tera Contributor

Hi @rinathombar ,

1. First, identify which view is being displayed in your workspace. Check if it is the default workspace view.

2. Once confirmed, create an Client Script or a UI Policy script on workspace view and use the following method to hide the section:

g_form.setSectionDisplay('section_name', false);

3. If you are unsure about the backend name of the section, navigate to the Sections table (sys_ui_section) in your instance and search for the form and view you are working with — the backend name will be listed there.

If you find this useful, please mark it as Helpful or Accept it as the Solution.

 

Regards,
Harish




RakeshM49470519
Tera Guru

Hello @rinathombar ,
use client script and use g_form.setSectionDisplay('section_name', false) method to hide the section

The section name should follow these rules:
1.Replace space with  underscore
2.Convert uppercase letters to lowercase

in your case , use  g_form.setSectionDisplay('policy_setup', false);
use it in onload client script to hide it permanently

rinathombar
Tera Contributor

i used UI policy and it works