Mandatory catalog variable to be made invisible on task form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 11:51 AM
Hello friends,
I have created a variable "Cost_center" on catalog item in a variable set. The variable in Mandatory.
Now, on Catalog Task form I want to make this variable invisible based on a condition that if "Region" is "India".
I tried with UI policy and catalog client script, the field becomes invisible but still is mandatory.
CS:-
Please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 11:57 AM
Hi @Asmita7
Did you configure the mandatory on the variable level or by using the UI policy?
If you configure the mandatory on the variable level try to do it by UI policy.
Thanks and Regards
Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 12:10 PM - edited 05-07-2024 12:11 PM
I have configured Mandatory at Variable level.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 12:11 PM
Can you try by making mandatory in UI Policy
Thanks and regards
Sai Venkatesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 03:06 PM
Hi @Asmita7 ,
Could you please try creating Onchange client script and i have tried the same scenario in my pdi its working please do give it a try,
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if( newValue == '7') //change newvalue according to your need
{
g_form.setMandatory('requested_for',false);// change the backend name
g_form.setDisplay('requested_for',false);// change the backend name
}
//Type appropriate comment here, and begin script below
}
try with below code,
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang