- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 02:16 AM
Hi All,
The section of the requested form will be visible when click on button any one please help
please send code for it.
Thanks in advance.
Thanks,
Shrinivasprasad
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 02:59 AM
Hi Shrinivasprasad,
You should check the client(checkbox) true in ui action and mention the unique function name in the onclick field as: setsectiondisplay();
and write the code as below:
function setsectiondisplay(){
g_form.setSectionDisplay('test',false);
}
Replace the 'test' with the section name
Make sure section name of your section, 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.
Hope this will resolve your issue.
Kindly mark correct/helpful based on the impact.
Regards,
Alok

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 02:18 AM
Hi
Where are we doing this?
If not portal then you can try this code in Ui Action.
var sections = g_form.getSections();
sections[4].style.display = 'none';
Regards,
Omkar Mone.
www.dxsherpa.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 02:33 AM
Hi Omkar,
Thanks for quick response,
This code is not working
i took planning as a button i want to perform that action.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 02:19 AM
Refer below link
https://www.servicenowguru.com/scripting/client-scripts-scripting/showhide-form-section/
Use these scripts in ui action in client side and run it on click

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2019 02:59 AM
Hi Shrinivasprasad,
You should check the client(checkbox) true in ui action and mention the unique function name in the onclick field as: setsectiondisplay();
and write the code as below:
function setsectiondisplay(){
g_form.setSectionDisplay('test',false);
}
Replace the 'test' with the section name
Make sure section name of your section, 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.
Hope this will resolve your issue.
Kindly mark correct/helpful based on the impact.
Regards,
Alok