- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 12:13 AM
Hello everyone, do you know how to hide certain sections in Workplace when a specific condition on the form is met?
For example, if the login date is after today, I want to hide or collapse the section named "User Information".
Solved! Go to Solution.
- Labels:
-
workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 12:35 AM
you can show/hide the section using this in client script or UI policy script
g_form.setSectionDisplay('section_name', false);
// section name is convert everything in lower case and use _ if space is there
Example:
g_form.setSectionDisplay('resolution_information', false);
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
‎05-14-2025 12:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 12:18 AM
Hi @kack l
You need to create a client script for the specific workspace view to meet your requirement.
- Identify the view linked to your workspace.
- Create the client script with the Global checkbox unchecked, allowing you to specify the workspace view name.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 12:31 AM
Thank you for your answer. How can I get the physical name of the section?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 12:35 AM
you can show/hide the section using this in client script or UI policy script
g_form.setSectionDisplay('section_name', false);
// section name is convert everything in lower case and use _ if space is there
Example:
g_form.setSectionDisplay('resolution_information', false);
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
‎05-14-2025 12:56 AM - edited ‎05-14-2025 12:58 AM
section
client script’
I don't know why. No response。