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

how to make variables in form non mandatory for end users while filling the catalog item

sainath reddy
Tera Contributor

I have a requirement in catalog item that for ITIL role users while filling form some fields will be mandatory and while the end user is getting created the same variable should be non-mandatory in catalog itm.how to resolve this requirement.

1 ACCEPTED SOLUTION

Hi @sainath reddy ,

please use following script(when to run) in catalog ui policy.

 

if(gs.hasRole('resolver')){

return true;

}

 

plz mark helpful if satisfied with the code.

 

View solution in original post

8 REPLIES 8

Hi @Nilesh Pol1 

 

If the variable should be mandatory for "resolver" role.can you mention the script once in the  chat

 

Thanks

Sainath Reddy

Hi @sainath reddy ,

please use following script(when to run) in catalog ui policy.

 

if(gs.hasRole('resolver')){

return true;

}

 

plz mark helpful if satisfied with the code.

 

Hi @sainath reddy

You can try a on load client  script with the code below,

   if (g_user.hasRoleExactly('resolver')){
       g_form.setMandatory('discription',true);
   }else{
       g_form.setMandatory('discription',false);
   }
 

Nivedita Patil
Giga Sage

Hi @sainath reddy ,

 

Mark my answer as accepted solution  and helpful if issue resolved.

 

Thanks,

Nivedita Patil