- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 08:00 AM
I have read some post on this but none of the solutions are working for me
Created this client script to hide or show when a sub-category is selected on the change_request form:
variable: u_sub_category = "Firm Policy"
however, when i try it out, the tab still shows:
and when i select Firm Policy in the sub-category i get this error
what is wrong with my client script.
any help will be appricated
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 08:16 AM
You want to hide the Firm policy section when Subcategory is selected as Firm Policy?
If yes you have to hide the section using below syntax:
if(g_form.getValue("u_sub_category") = "Firm Policy")
{
//and in the firm policy section there are some mandtory fields so make them non_mandatory before hiding the section else it wont hide
g_form.setMandatory("field_name",false); //map mandatory fields in firm ploicy section
g_form.setSectionDisplay("firm_policy",false);
}
else
{
//make mandatory and display the section
}
Hope it helps
(=tested)
Thanks
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 08:08 AM
Hello,
Just use the below:-
To hide:-
g_form.setSectionDisplay('sectionname',false);
To show:-
g_form.setSectionDisplay('sectionname',true);
Please mark answer correct/helpful based on Impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 08:11 AM
Please do the following validations first.
1. Check your Sub-Category choice "Firm Policy" name not the readable "label".
2. Line 6, please use g_form rather g.form
3. Line 7, if(g_form.getValue('u_sub_category') === "<Firm Policy name>"
4. Check all your UI policies or client scripts to see any mandatory fields in the section "Firm Policy". If there are some to set all mandatory to false
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 08:16 AM
You want to hide the Firm policy section when Subcategory is selected as Firm Policy?
If yes you have to hide the section using below syntax:
if(g_form.getValue("u_sub_category") = "Firm Policy")
{
//and in the firm policy section there are some mandtory fields so make them non_mandatory before hiding the section else it wont hide
g_form.setMandatory("field_name",false); //map mandatory fields in firm ploicy section
g_form.setSectionDisplay("firm_policy",false);
}
else
{
//make mandatory and display the section
}
Hope it helps
(=tested)
Thanks
Murthy
Murthy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2022 08:22 AM
thank you that did the trick