Forum Academy Marketplace Showcase Pricing Features

Repeating Group inside of a repeating Group where a user can select multiple Categories but 1 Subcategory

I have a Repeating Group displaying “Categories”. Also inside of that Repeating Group i have another Repeating Group displaying “SubCategories” specific for that “Category”.

I want the user to have the option to select multiple Categories but only 1 SubCategory for each Category

I am using custom states for when the group inside of the repeating group is selected it sets the state.
Currently I have both Category and SubCategory set as list for the custom states.
When I set Subcategory to not a list I lose the ability to select items in different categories.

Is there a easy way to set it up to where only 1 SubCategory is selected per Category?

Preview Categories and SubCategories

Editor

Hi there, @agoulas… I made an example that does what you described (if I understand your post correctly) by doing a count of the number of sub-categories in the custom state that belong to the current cell’s category, and the sub-category is only added to the list if the count is 0. So, something like this…

Hope this helps.

Best…
Mike

Thanks Mike,

That works!

Would you know how to get it to function almost like a radio button? If i were to select a different SubCategory option it would minus the Current SubCategory State then plus “New” Current Cell SubCategory

I got it currently where you have to select the selected cell to minus.

Hope that makes since. Thanks a bunch Mike!

Sure. First, get rid of the Only when condition I showed in my screenshot. Then, add another action in front of the action I showed, and that action looks like this.

So, the first step in the workflow gets rid of a sub-category that is already in the list (if there is one) that has the same category as the sub-category that is being clicked, and the second step adds the clicked sub-category to the list.

Beautiful!
That works exactly how I wanted.
Thanks Mike!

1 Like