Dynamic variables on Service Catalog

avinashkande
Tera Contributor

Hi,

We have a requirement as below, please help with your ideas on how to build this.

Need to create a catalog item with reference to cmdb application table (around 500 applications), on the form when user selects an application we should dynamically show variables based on the application selected,

For example : User selects CISCO need to show below fields

1. subcategory 2. environment 3. summary 4. description etc

When user selects Active directory should show 6 different fields and so on..

Please let me know if anyone has implemented this kind of solution..

 

3 REPLIES 3

RAHUL YADAV9
Mega Guru

In this onchange catalog client script you can show/hide the variables with that you can set mandatory or non mandatory fields as well.

 

if you have 500 applications and want to it dynamically then you can create a custom table where you will hold the visible fields for that selection and you can glide record that table in catalog client script and look for the fields that needs to be visible.

Please let me know in case you need help with script.

 

Please mark correct if helps.

Rahul Talreja
Mega Sage
Mega Sage

Hi Avinash,

You can achieve this either of the ways,

Firstly, via a catalog UI policies -  If you have simple conditions so you can design the policies according to the requirement.

Second, If the logic for this is complex, better go with scripting and write a on change catalog client script referring below:


find_real_file.png

 

Here you should also use the "Clear the variable value" option, or add scripting to empty the variable for the cases if end user selects another choice after filling up the form.

Regards,
Rahul

Please mark my response correct/helpful as applicable!
Thanks and Regards,
Rahul

Hi Avinash,

Is your problem solved?

Please mark my response correct/helpful as applicable!

Regards,
Rahul

Please mark my response correct/helpful as applicable!
Thanks and Regards,
Rahul