Hide Incident Variable Editor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2023 12:32 AM
Hi All,
How to Hide Variable section( Incident Variable Editor) on incident form.
Please suggest if any one have idea for this requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2023 01:11 AM
Hi @ashok17
open the form designer and search for the "Incident variable editor" formatter. Then remove it.
In the below screenshot it is not placed on the form but available to be dragged to the canvas.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2023 01:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2023 01:54 AM
Hi @ashok17
in your screenshot you have marked the section (the tab) and not the variable editor which is inside the section. Therefore it's not clear what exactly you want to achieve, and I have to make assumptions.
In case you want to hide the complete section, you will need a client script of type "onLoad" which performs
g_form.setSectionDisplay('variables', false);
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-31-2023 02:08 AM
Hello @ashok17 ,
You can simply use either UI policy or onLoad Client script to achieve this and use below syntax to hide the form section.
g_form.setSectionDisplay('<section_name>', false);
The section name is lower case with an underscore replacing the first space in the name, and with the remaining spaces being removed, for example "Section Four is Here" becomes "section_fourishere". Other non-alphanumeric characters, such as ampersand (&), are removed. Section names can be found by using the getSectionNames() method.
But before using UI policy or client script decide the trigger condition for that, like based on which field value or choice you are going to hide the section or in your scenario if variable part is empty then accordingly add/use those conditions in UI policy or client script.
Refer the below links as well for better understanding:
- Servicenow Form Section Hide / Show | Servicenow form section
- How to hide a section using a UI Policy
Let me know your views on this and Mark ✅Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.
Thanks,
Aniket