The CreatorCon Call for Content is officially open! Get started here.

Not able to hide the variable set of a catalog item

aditya174
Tera Guru

Hi Im trying to hide my variable set Create new group based on the selection of the request type:

aditya174_0-1731424409231.png

aditya174_1-1731424413895.png

aditya174_2-1731424417365.png

 

 

Using the following code:

 

function onChange(control, oldValue, newValue, isLoading) {
// if (isLoading || newValue == '') {
// return;
// }
var type = g_form.getValue('request_type');
if(type=='create'){
//g_form.addInfoMessage('test '+type);
g_form.setVisible('Create_New_Group',false);
g_form.setDisplay('Create_New_Group',false);

g_form.setVisible('create_new_group',false);
g_form.setDisplay('create_new_group',false);
}

//Type appropriate comment here, and begin script below

}


But it is no hiding the variable set, I've also checked there are no containers in the variable set.

6 REPLIES 6

Adil N
Tera Expert

If you can share a screenshot if the request item it might be useful. 

 

Have you tried setting up catalog UI Policy? 

Yes i did try the Ui Policy and Catalog client script from above still it is not working

Pradeep Thipani
Mega Sage
Mega Sage

Hi @aditya174 ,

 

You can use the catalog UI Policy to achieve this with no code. Find the below screenshots might help you

Add the filter condition for catalog with variable name:

PradeepThipani_0-1731426074908.png

 

Add the variables which you want to hide from the from under Catalog UI policy actions

 

PradeepThipani_2-1731426118936.png

 

Thanks,

Pradeep

 

"If this response was useful, please select 'Accept as Solution' and mark it as 'Helpful.' This helps me provide better answers and assists the community ".

Regards,
Pradeep

There are 50 variables in the set.