I’ve structured my data so that I have multiple restaurants which each have a list of another structure I made called tags. I’m trying to implement an upvote system for the tags of each restaurant.
But whenever a tag is clicked through any restaurant page it increases the count of the universal tag structure’s count meaning it’s not instantiating a unique tag for every restaurant in the database
I’m not sure how to instantiate a set of tags for each restaurant so that it is unique. Is there any way to do this without manually making dozens of tags for every restaurant under the tag structure?
Hi there, @revel90024… if I understand your post correctly, one way you could go is to have a data type that has a
restaurant field (linked to the
Restaurant data type), a
tag field (linked to the
Tag data type), and a
count (number) field. Then, when a tag is clicked for a restaurant, you search for the thing in the new data type with the associated restaurant/tag combination, and you increase its count by 1. Sure, with this structure in place, the number of records in the new data type could grow to be pretty large (depending on how many restaurants and tags you have), but I’m guessing it would still be easily manageable in Bubble.
If you go this route, you could use a backend workflow to create the restaurant/tag records in the new data type when a new restaurant is added. If a new tag is added, you could use a backend workflow to create a new record with that tag for every existing restaurant.
Anyway, just some food for thought there, and I hope it helps.
That sounds like a good solution thank you!
I was wondering though because I’m still in the prototyping phase so I haven’t upgraded to a paid plan yet and I got an email that said I’ve maxed out the available data space.
Would this have anything to do with it not working how I intended or is my data structure logic fundamentally not working?
The issue you described in your initial post is related to your data structure, not the fact that you are on the free plan.