I Want More Than Just: "How do I set up the Repeating Group's Type of Content and Data Source to only show "Type X" products on page?"

I’m new to Bubble and after a few good days of feeling like “I’m getting this” I now have the dreadful feeling of “how can I not solve something so basic?! I am so dumb, I will never get this, stop now!” So before I suffer alone any more, I will ask for help (this is something I’m working on in therapy :slightly_smiling_face )

The simple part: On my site, I want to have category pages for the main types of products (beef, pork, chicken, etc. So on the Beef page I want only beef products to show which will make filtering on that page easier (because some attributes only apply to beef while others only apply to chicken, etc).

How do I set up the Repeating Group’s Type of Content and Data Source to show only products with a Type of Beef? When I get to Constraints Type = I get stuck in what seems like a loop or endless layers.

The harder part: I need to move out of the “monkey see monkey do” phase and into knowing, really knowing how to do. What are some of the best sources/content to learn the underlying principles?

Well, if you only want to show products who’s Type is Beef, then you need to specify ‘Beef’ in the search constraints, in the Type Field (you already know that)…

How you do that will depend on a number of factors, which will be unique to how you’ve set your database up, and how you’re referring to data on the page… so without knowing those things I can’t give specific help…

If your RG is static (i.e. it’s on its own static page, and will only ever refer to ‘Beef’ products) then, at some point, you’ll need to define the Type= Beef… if it’s an Option Set you can use ‘Get an Option’, if it’s a database entry then you’ll need to ‘do a search for’…

It would make sense to do that somewhere on the page (as a parent group’s datasource), then simply refer to that in your RG datasource, rather than do it directly in the RG (assuming you’ll be mentioning Beef elsewhere on the page…).

But, that doesn’t seem like a very good way to do things… much more sensible to keep things dynamic…

Again, without knowing anything about your app I can only give suggestions…

But, for example, if you have any way on the page to select a specific Type (i.e. a dropdown menu) then you can use it’s value as the search constraint.

Or, if you’re using dynamic pages for your category pages (which would be the most logical way to do do this), them simply refer to the Current Page's Type in the RG datasource search constraints.

The harder part: I need to move out of the “monkey see monkey do” phase and into knowing, really knowing how to do. What are some of the best sources/content to learn the underlying principles?

The Bubble manual, this forum, and the Bubble tutorials are a good place to start…

But honestly, the best way to learn (in my view) is by doing and experimenting, then looking for help (in the manual or forum) as and when you need it…

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.