How to create a category

Hi Bubbler

ho do you set up your database if you want to allow user to create one or more products with general info like (name , quantity, price ecc) and then to create categories to group those products
thanks for answering

  • Create an option set called “Category” and all the options you need
  • Then to the product add the field “Category” of type “Category”
  • Or if more than one then to the product add the field “Categories” of type “list of categories”

Thanks but i want the user to create their own categories and then to group their products based on those categories:)

Got it.

Then instead of option sets … create a thing called category and relate it to the product either as a single category or a list of categories.

Yes, that’s what I’ve done. Category contains a list of Product. Then your users can create categories, and add products. And even move products from one category to another one, and so on.

ok but how do you set your data base?:slight_smile:

I would do it this way.

  • A product can belong to one or more categories
  • If you did it as a category has a list of products then you would run into scalability problems if your product list grows beyond 100 (Bubble recommends to keep lists below 100 entries). It is likely that categories will be a list of less than a 100 so by doing it as below would allow you to scale.




1 Like