Need to hide checkbox section based on condition
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 05:22 AM
Hi
I have created a mandatory check box section with label (created one label field and 4 check box field made this section has mandatory using ui policy by keeping "and" condition of all option's is not true and ui action as one of the option is mandatory) now this section is multi select mandatory field.
Now i need to hide the entire section (boxes + label) based on another condition
Example field - It is required? options yes no if no is select then this entire section should be visible if it is yes entire section should not be visible
Tried ui policies but it is not hiding the entire section only 1 0r 2 check boxes are hidden
How it can be achievable
Thanks,
Suuriya
- Labels:
-
ITSM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 05:32 AM
Hi,
You have to make all check-boxes and label fields as non-mandatory and then you have to hide the sections and fields.
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 07:08 AM
Hi Sagar,
but I need the check box to be multi select mandatory field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 05:34 AM - edited 11-23-2022 05:34 AM
Hi @suuriya
In order to hide section use client script and on Change of box use below line of code.
g_form.setSectionDisplay('closure_informtaion', false); //Writedown your section name
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2022 07:10 AM
Hi Kiratkar,
I tried it is not working it is throwing script error in portal
