Field options need to be change based on value selected in other field

suuriya
Tera Contributor

Hi,

 

I have a requirement, in catalog form there is a select box field called Type (cloud, apigee,Pmi....) and another select box field called Type of access (readonly , write, developer, viewer.admin,user....) and this field display in form when any of the option is selected from Type field.

But if i select apigee from type field then only developer and viewer option need to display in type of access and developer option needs to be there only for apigee when other values selected in type field other than apigee the developer shouldn't be display.

 

Please provide entire onchange Client script how to achieve this

 

Thanks in advance

4 REPLIES 4

Sagar Pagar
Tera Patron

Hi @suuriya,

 

I would suggests to use Catalog UI policies, if you just need to hide and show variables based on certain conditions, instead of Catalog Client scripts.

 

If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers! 👍🏻
Thanks,
Sagar Pagar

The world works with ServiceNow

HI @Sagar Pagar ,

 

We can hide and show variables but not the choices/options in the variable right?....we need the script for it I guess

Hi @suuriya,

 

If required, you can write scripts in Execute if true and Execute of false options as well in Catalog UI policies.

 

If my response helps to solve your issue. Kindly mark it as helpful & correct. It will be helpful for future readers! 👍🏻
Thanks,
Sagar Pagar

The world works with ServiceNow

Hi @suuriya,

 

 

Hope you have gone through my above comments. Let me know if have any issues.

 

If my response helps you resolve your issue. Kindly mark it as helpful & correct. It will be helpful to future readers! 👍🏻
Thanks,
Sagar Pagar

The world works with ServiceNow