Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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 

1 ACCEPTED SOLUTION

@rinathombar 

so you are saying you want to hide only when that record is opened in Compliance workspace then section to be hidden?

if record is opened in SOW then don't hide section?

💡 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

View solution in original post

12 REPLIES 12

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 Expert

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




Rakesh_M
Kilo Sage

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