one variable dependent on another variable in catalog item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2021 02:13 AM
Hi All,
I have a multiple choice of variable. there is 2 question , I have added in catalog item
I wanted to some variables dependent on 2nd choice of question in catalog item.
whenever user select 2nd choice of question, only that time those dependent field should be visible.
How can I achieve this .
plz help ,
Thankyou,
Tanya
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2021 02:26 AM
You can most easily do this by Catalog UI policies. Second choice is client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2021 04:08 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2021 08:26 AM
There are many approaches for your requirement. Please find best approach meet your need from the following posts:
Catalog item variable dependency on other variable
Need help to make a variable dependent on another in a Catalog Item
How to add dependent field on another field in catalog item variable.
If my reply is Helpful/Correct, please mark the answer as correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2022 02:58 AM
You can use one of the method,
1. you can write a onchange catalog client script
Example: variable "A" depends on variable "B"
select field name: B
in the script section:
you can use below methods as per your logic
g_form.addOption(), g_form.removeOption(), g_form.clearOptions()
2. In case if you have more options, you can do as below
create custom table with columns (variable A field, variable B field,...etc)
select variable type of A is lookup select box
reference: custom table
reference query: javascript:"table=XXXX AND variable A column= value AND variable B column=" + current.variables.variable B;
3. -> create a choice list as below
table = catalog item
element = variable name
text = variable A choice lable
dependent = variable B
-> Create variable "A" as below
type: lookup select box
reference: choice list (sys_choice)
reference query: javascript:"table=catalog item AND element = variable name AND dependent=" + current.variables.variable B;
Please mark helpful if it answers your question.