Dynamically choose a dropdown's option set from the current choice in another dropdown

Hello,
I’m trying to create an input form with two option set based dropdown inputs. The user selects an option for category from the first dropdown which informs the second dropdown which additional option set to present the user with its sub-categories. This is very straightforward if the choices for both dropdowns are derived from the DB. However, I’m having a challenge implementing it when both dropdowns derive their choices from Options Sets (the choice for category specifies which option set the dropdown for sub-category should use). How can I accomplish this?
Thanks!
Roy

Hi there, @royjay… you can go one of two ways here. You can add an attribute to the sub-category option set that links each sub-category to an option in the category option set or you can add an attribute to the category option set that defines a list of sub-categories that are associated with each category.

Regardless of which way you go, your choices source for the sub-category dropdown will be all of the sub-category options filtered to show only the options that are associated with the selected category.

Hope this helps.

Best…
Mike

Edit: if a visual would help, here is the dropdown for the sub-categories, and it is based on the sub-category option set having an attribute (called category) that links to the category option set, with each sub-category being associated with an option from the category set.

2 Likes

Hi Mikeloc I’m having a similar issue - but having created the attribute in the Category option set, I am not seeing the ability to add the constraint in the workflow. Perhaps I’m getting something wrong at the DB end - can you detail a bit further the steps to creating the attribute? I feel like perhaps I’m missing a step between creating the attribute and setting up the workflow. I currently have the attribute in the Category Option Set established as Sub-categories, list of sub categories (though I am not clear how or where to establish this list…)

I read elsewhere that I should forget Option Sets and create a Category and Sub-category Data Type. Again, the workflow here is proving a challenge to implement.

Would you recommend one of these solutions over the other?
Thanks for your help.

I have found where to add the constraint. However, the option to choose This Sub-categories’ “category is dropdown” is not available. I can only choose ‘display’.