
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2020 07:56 AM
I have a requirement to hide section without condition - can I achieve this through a UI policy?
I tried this option no luck..
On the When to apply tab, add your conditions.
On the Script tab, select "Run Scripts" then enter the following
Execute if True
function onCondition() {
g_form.setSectionDisplay('Accounts', true);
g_form.setSectionDisplay('Finance', true);
}
Execute if False
function onCondition() {
g_form.setSectionDisplay('Accounts', false);
g_form.setSectionDisplay('Finance', false);
}
any idea how to achieve this.?
Cheers,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2020 08:02 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 04:59 AM
g_form.setSectionDisplay('schedule', false);
The first parameter is simply the name of your section, which should be completely lower-case.
Sections including spaces should use an underscore in place of the first space with the rest of the spaces removed.
For example, a form section with a label of ‘Schedule and Planning’ would require a parameter of ‘schedule_and_planning’. The second parameter is a true/false boolean that indicates whether the form section should be visible or not.