Repeating Group duplicates/database structure help

Hi everyone!

Pretty new to bubble but it’s such a wonderful tool so easy to get started on things.

Could I please ask for help on repeating groups. Users can enter their purchased product, who they purchased from and then their review. Other users will then be able to search for a particular product of which they will be able to select from products with similar names and then get the review information that other users have entered

The issue occurs when 2 different users have entered the same review (as two people may of course purchase the same computer game) because when another user searches for the game they will see a duplicate entry (an entry from both of the people that entered their game

My repeating group that shows the product list (once a user has searched for something) is based on “a thing” as in each repeating group entry I would like to show the name of the product, the purchase store address, star rating etc)

My database is currently set up so that I have fields such as store address, store name, game name, price, good points, bad points and each row corresponds to a game entry

I think this might by a database structure issue but have little experience in this area
Many thanks for any help anyone can provide!

Daivik

If you are storing product (game) info and review info in the same table (data type) then that’s probably where the problem lies. You should instead have two tables:

  • Game (name, any other data that applies to the game itself and won’t be different for each review)
  • Review (reviewer [type = User], game [type = Game], store name, store address, price_paid, pros, cons)

The important thing here is that you need to link a Review record to a Game using the ‘game’ field.

Then your search can use a repeating group of products matching the user’s input and then a user can click on a product to show another repeating group of reviews for that product.

Thanks a lot @louisadekoya! I mostly understand what you are saying but cannot seem to figure out how to link the review record to the corresponding game field in Game. As the game field in Review database is a Game, (on workflows) it will not allow me to record text to the game field in the Review database

Would you be able to shed some light here?

Many thanks,
Daivik

So I’m suggesting that you change your data(base) structure. That you should make it so that you use two tables as above. If you mean that you don’t know how to set a field on the review table to type Game (to link them) then, this is how (in my example game is product).

product_field

I have done a little example here of what I think you’re trying to do.

Very sorry for the late reply but thank you very much Louis - your tips helped me a lot!

1 Like