Dynamic variables on Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2022 08:21 AM
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..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2022 08:35 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2022 09:53 PM
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:
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
Thanks and Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2022 12:03 AM
Hi Avinash,
Is your problem solved?
Please mark my response correct/helpful as applicable!
Regards,
Rahul
Thanks and Regards,
Rahul