
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-31-2018 08:00 AM
I have a catalog form where the requestor would like to have the value of a variable (chosen by the user) to display only values which correspond to those values. How can I make variables dependent on another variable's value in Service Catalog?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-31-2018 08:24 AM
I figured out how to do this with a Reference Qualifier on the dependent variable. For example, we have a requirement to make a child catalog variable "Sub Industry" dependent on the parent variable "Industry" on a catalog form. To accomplish this, I also wanted to have the child variable setup as a reference to a custom table as the values were an extensive list of Sub Industries. After I set up the child variable as a type of reference, I used a javascript in the 'Reference qual' field. The javascript used set the parent column label to equal the parent variable and looked something like this: javascript:'u_industry_parent='+current.variables.var_industry. I was having trouble when the child variable would be selected and figured out that I needed to make the child column on the custom table set with a Display value equal to yes. Prior to this, the value returning was the some other value on the table and it wasn't what I was looking for. I hope this information helps. I referred to a few articles on the community but couldn't find one that tied it all together.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā10-31-2018 08:24 AM
I figured out how to do this with a Reference Qualifier on the dependent variable. For example, we have a requirement to make a child catalog variable "Sub Industry" dependent on the parent variable "Industry" on a catalog form. To accomplish this, I also wanted to have the child variable setup as a reference to a custom table as the values were an extensive list of Sub Industries. After I set up the child variable as a type of reference, I used a javascript in the 'Reference qual' field. The javascript used set the parent column label to equal the parent variable and looked something like this: javascript:'u_industry_parent='+current.variables.var_industry. I was having trouble when the child variable would be selected and figured out that I needed to make the child column on the custom table set with a Display value equal to yes. Prior to this, the value returning was the some other value on the table and it wasn't what I was looking for. I hope this information helps. I referred to a few articles on the community but couldn't find one that tied it all together.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā06-12-2020 12:00 AM
Hi All,
Please take a look at Article below:
1. dependent on single table
2. dependent on two tables using referene
[SOLVED]: - Dependent variable on Catalog item using Lookup Select Box
https://community.servicenow.com/community?id=community_article&sys_id=1ce7dceedb5914101cd8a345ca961952
If my answer solved your issue, please mark my answer as ā Correct & šHelpful based on the Impact.
Thank you!
Regards,
Kailash.