- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2018 10:10 PM
Hi Team,
I am unable to hide the mandatory field using UI Policy. Because there is a variable set ,using the same field for 5 different items. can anyone help me
Regards,
Saridha.L
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2018 06:22 AM
As other suggested UI Policy is good option where you can select the particular catalog item and then based upon variable value changes you can to set the field behavior. You can build the condition. I think when you are selecting the Catalog item then it should not impact other catalog item if they are referring the same variable set.
if there is any issue with UI Policy then give a try with catalog client script if that helps. Simple Sample Script (change the field_name accordingly)
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue == 'PUT THE FIELD VALUE HERE'){
g_form.setMandatory('field_name', false);
g_form.setDisplay('field_name', false);
}
else{
g_form.setMandatory('field_name', true);
g_form.setDisplay('field_name', true);
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2018 02:03 AM
have your tried to give higher order number on that ui policy ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-03-2018 02:01 AM
Hi Saridha,
On the UI polciy Condition please select the catalog item name. On a single catalog item for a single field only one Ui policy can work. So make sure for that same field no other UI policy is running on same catalog. Please find the below screenshot where you might select your catalog item name.
Hit like or helpful if helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2018 06:22 AM
As other suggested UI Policy is good option where you can select the particular catalog item and then based upon variable value changes you can to set the field behavior. You can build the condition. I think when you are selecting the Catalog item then it should not impact other catalog item if they are referring the same variable set.
if there is any issue with UI Policy then give a try with catalog client script if that helps. Simple Sample Script (change the field_name accordingly)
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue == 'PUT THE FIELD VALUE HERE'){
g_form.setMandatory('field_name', false);
g_form.setDisplay('field_name', false);
}
else{
g_form.setMandatory('field_name', true);
g_form.setDisplay('field_name', true);
}
}