Anyone have a better idea about how to structure this? (repeating groups)

Hello,
i want users of my app to be able to choose a category and add products to that category that will display on a public page

would I need to make a repeating group for every category and then hide/show with conditionals?

What about if i want a feature that users can create their own category, how would this be able to be displayed on the page in a repeating group ?

is there a way to make repeating groups ‘dynamic’ so they show data based on sub-categories?

if having custom user categories is not possible, and i have around 30 sub categories would the only way of displaying these, be 30 ‘hard coded’ instead of dynamic repeating groups on the page and conditionals showing/hiding depending on what the user decides

is there a better way?

Thanks for reading

sounds simple enough…

would I need to make a repeating group for every category and then hide/show with conditionals?

hell no!!!..

What about if i want a feature that users can create their own category, how would this be able to be displayed on the page in a repeating group ?

Simple… the RG would be set to display a list of Categories (which would be a Custom Datatype in your app), or perhaps a list of products within the given Category (depending on exactly what you’re trying to show)… when a User adds a new Category it will then be displayed in the RG.

is there a way to make repeating groups ‘dynamic’ so they show data based on sub-categories?

RGs are dynamic… they will show whatever data you define in the datasource (or set using a Display List workflow action)…

If you want to define what they display based on a sub-category, then just include that as one of the search constraints, filters, or list-fields (depending on your datasource)…

if having custom user categories is not possible,

… it is…

and i have around 30 sub categories would the only way of displaying these, be 30 ‘hard coded’ instead of dynamic repeating groups on the page and conditionals showing/hiding depending on what the user decides

… no… that would be one (very inefficient) way to do it… (the only time you might want to do that is if you need to display different datatypes in each RG… and even then there are better ways to do it)…

is there a better way?

…better than having 30 different RGs on the page?.. pretty much anything would be better than that!!..

But the simplest way is to have a single RG and just add the relevant constraints the the datasource…

(it’s not actually clear from your question what exactly you’re trying to show… you mentioned sub-categories, and you mentioned User-created categories… but in any case, just set your data source accordingly… - in some instances you might even need to use conditional data sources… but that’s still a lot better than having 30 RGs)…

If you want some more specific help, you’ll need to share more specific details about what you’re actually trying to do…

But in all likelihood it’s a lot simpler than you seem to think…