I am trying to build a repeating group to display a list of data type = posts.
Each post contains a field that stores a list of countries, which I tie to the custom data type countries. A post can include multiple countries.
I want to be able to filter the repeating group based not on country but by continent. I’ve created another data type called continent, with field = list of countries. (So, for example, continent Europe contains a list of countries like France, Germany, Spain, etc). I would prefer to only tag posts by country rather than having to tag both by country and continent.
I basically want to be able to filter posts that match countries within a specific continent selected from a drop down.
In my mind this should be simple but I can’t for the life of me figure it out. Any ideas?
what I would usually do is join the continent and post tables.
Since you mentioned not wanting to do that, what you can try is the following:
Note, this isn’t a simple search, so could take a little longer for Bubble to do.
Hope that works for you, let me know if you have any questions.
For free tips & step by step lists on Bubble.is & more check https://tiplister.com/
Why the reluctance to add Continent to the post thing?
Suggest that’s your best solution.
@David_A, you can keep the list of countries on your continent data type if you like but you won’t use that for this scenario. To do what you are asking here, you will need to add a Continent field to the country data type.
Then its a simple matter of doing a search for posts…
And then filtering with an advanced filter like this.
Having a continent field on your post would be quicker and more efficient for using the continent as a search constraint but this method will work as well.
Thanks all for the responses. I’ve thought about it some more and I agree that adding a continent field to each post will be the most efficient way to handle this, although the advanced filter proposals are very helpful. Thanks @TipLister and @eli
This topic was automatically closed after 70 days. New replies are no longer allowed.