How do you change what choices are shown based on the choices made in another variable in a record producer?

mahudg2
Kilo Expert

I'm creating a record producer where a category and subcategory is shown.

Subcategory and category are both custom variables that are drop down lists. But I want the subcategories to be based off what category is shown.

For example when someone chooses phone for the category I'd like the subcategory to show phone related items.

 

Would this be a good place to use variable sets?

1 ACCEPTED SOLUTION

mduluk
Giga Expert

I don't see a dependent in catalog variables like they have in Choice lists on forms.   What you might need to do is use the catalog UI policies.     Make a different sub-cause for each choice in the cause.   So if you had 5 causes, then there would be 5 different sub cause variables.     Then use the UI policies to hide the different sub causes until the correct cause is chosen.   This sounds messy, so hopefully someone else can come up with a better idea.


View solution in original post

14 REPLIES 14

Hi Michael.



I could use some help ! thanks in advance .



Requirement:


Re: Category|Subcategory1|Subcategory2 implementation in Service Catalog


Hi Naga,


You should be able to adjust the script mentioned in the link I posted above to meet your needs. Here is the link again https://community.servicenow.com/message/733618


It appears that you are using a Record Producer in your example. If I get time I'll see if I can set up an example that better matches your specific requirement.


randrews
Tera Guru

while you can do this.. and it works.. it is a bit of a pain.. especially if it is a mando variable.. lots of scripting ...



imho the better answer is to change it from a select box to a lookup select box.. they appear the same to the end user.. but the reference qualifier works on the lookup select box.


Danny Mortense1
ServiceNow Employee
ServiceNow Employee

Here's my take on this. I had a similar requirement which I resolved with a little help. You can check out my solution here.


Kailash Bhange
Kilo Sage
Kilo Sage

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.