- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 09:29 PM
The requirement is to show certain section in a form post save of record ServiceNow. Not sure how this can be done, I tried via onLoad Client script but seems this is the wrong approach.
Any help would be greateful.
Thanks,
Sreesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 10:48 PM
you can check if record is new and if not then show the section using this syntax
function onLoad() {
// hide it
g_form.setSectionDisplay('section_name', false);
if (!g_form.isNewRecord()) {
// show it if it's an existing record
g_form.setSectionDisplay('section_name', true);
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 09:34 PM
Hello @sreeshsurendran ,
I have taken here example of closure information section,
You can modify it according to your section
Use the below in client script
g_form.setSectionDisplay('closure_information',false);
Please mark it as correct if this helps you.
Regards,
Debasis

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 09:51 PM
Hello @sreeshsurendran ,
You can write on load script or on change depending on your selection and you can check
for example if my state is closed then only i want to show the closure information tab then the foloowing will help
if(g_form.getValue('state')=='7'){
g_form.setSectionDisplay('closure_information',false);
}
like the above you can build your own condition this will help you.
Please mark it as correct if this resolves your issue.
Regards,
Debasis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 09:37 PM
hi @sreeshsurendran , Form sections can be configured using Form Design. You can add or remove a form section or you can also add or remove fields of any section.
In below snip see various section of an incident record highlighted in Green.
If my response helped, please mark it correct and close the thread so that it benefits future readers.
Regards,
Rohit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2025 10:48 PM
you can check if record is new and if not then show the section using this syntax
function onLoad() {
// hide it
g_form.setSectionDisplay('section_name', false);
if (!g_form.isNewRecord()) {
// show it if it's an existing record
g_form.setSectionDisplay('section_name', true);
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader