How to make Variables in Catalog item Dependent?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-31-2020 09:30 AM
I have two variables 'Model' with more than 50 choice list values, and another values as 'Spare Part' with more than 200 choice list values need to make Spare Part field dependent on the value selected in Model Field.
I know a way of doing this by client script using Add option, clear option, but as there are numerous values are there so is there any other way by which i can achieve this?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-31-2020 09:42 AM
Hi Micky,
One other way is to create a new table and assign the Category to Subcategory. After which you can use the basic configurations to link up both using lookup select-box.
Here is how - Dependent variable on Catalog item using Lookup Select Box
Regards, Akash
If my response proves useful, please mark it "Accept as Solution" and "Helpful". This action benefits both the community and me.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-31-2020 09:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-31-2020 10:00 AM
Hello Micky,
For more details, Please check below article.
Creating Dependent Variables in Service Catalog
Regards,
Harshal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā08-31-2020 10:09 AM
Rather than creating custom tables (because custom tables now can have an impact on licensing cost, unless you utilize , I might suggest you look into using the Model and Model category tables to control the model names, and distinguish between "Spare parts" and "Models". Then, to make them dependent, you can use something like this:

-
Write a script include function that takes a parameter (which will be the first variable's value) to query the reference table of the second variable, and return a stringified encoded query based on that query.
-
We need to tell the system that the first variable has a dependency on it. To do this, in the "Default Value" tab (at least this is usually where it is), we need to add the following to the "Variable attributes" field:
-
For the second variable, we also need to tell the system that this variable is dependent on the first. Following the same navigation as the previous step, add the following to the "Variable attributes" field:
-
Finally, in the "Type Specifications" tab (again, this is usually where this field is), we need to add the following to the "Reference qual" field: