Cilent scipt

nameisnani
Mega Sage

Hi Team ,

 

Catalog Build 

 

When ever user selects [ Request Category >> Production access ] , Then short desp and Descp field should be not visible .

 

NOTE :- Short descp and descp fields coming from the variable set .

 

Can anyone please help me here , 

 

nameisnani_0-1709714448384.png

 

Thanks in advance 

 

1 ACCEPTED SOLUTION

shyamkumar VK
Kilo Patron

@nameisnani , You can Write on Change Client Script on Request Category and use below script 

 

var access = g_form.getValue('request_category) // replace with correct variable name 
if(acess=='production access'){
g_form.setMandatory('variablename', false);
g_form.setVisible('variablename', false);
}

 

 
UI Policy based on Condition like Request Category is Production Access , Create UI Policy Actions for both Short Description - Make Visible to True and Mandatory to False on both Variables 
 
Short Description - Visible False - Mandatory False 
Description - Visible False - Mandatory False 
 
Regards,
Shyamkumar
 
Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

View solution in original post

18 REPLIES 18

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @nameisnani ,

 

you can create a Ui Policy for the catalog variable set.

 

1. go to > catalog ui policy > create new

2. Set the condition as >  Request Category" is  "Production access".

3. save the policy and from the realted list create a UI policy action to hide description and short description fields.

 

i hope this helps..


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

shyamkumar VK
Kilo Patron

@nameisnani , You can Write on Change Client Script on Request Category and use below script 

 

var access = g_form.getValue('request_category) // replace with correct variable name 
if(acess=='production access'){
g_form.setMandatory('variablename', false);
g_form.setVisible('variablename', false);
}

 

 
UI Policy based on Condition like Request Category is Production Access , Create UI Policy Actions for both Short Description - Make Visible to True and Mandatory to False on both Variables 
 
Short Description - Visible False - Mandatory False 
Description - Visible False - Mandatory False 
 
Regards,
Shyamkumar
 
Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

Simran Gadodiya
Mega Sage

Hi @nameisnani 
You don't need to write client script simply you can use UI policy for this.

Thanks.
Mark this as helpful or correct if it helps you.

Umesh Dubal 171
Tera Contributor

Hi @nameisnani 
go to catalog ui policy
Give first condition user  is not empty
and in catalog ui policy actions select field short description and select visible false
do same with description field