How to Show Only Items Present in Two Lists (Intersection) in a Repeating Group?

Hi everyone!

I’m working on a use case where I need my Repeating Group (RG) to show only items that exist in both a filtered database search and another list of the same data type, which I have stored in a Custom State or another group.

Here’s the scenario:

  • My RG is of type CARTOES TAB and is already showing results filtered from the database.
  • Separately, I have another list of CARTOES TAB (same type), coming from a Custom State or another group.

My goal:
I want the RG to display only the items that are present in both lists at the same time (i.e., the intersection).
It also needs to update dynamically, since the RG is filtered by a dropdown.

How can I achieve this kind of “list intersection” filter for a RG in Bubble?
If anyone has an example or best practice, I’d really appreciate it!

Thank you!

Are either of those lists a COMPLETE list of ALL possible CARTOES TAB?

Hi there,

I got this to work using an Advanced Filter on the 3rd (intersect) search, referencing that this item was in each of the other item’s list. Advanced Filters aren’t usually ‘Best Practice’ (more like 'only use if absolutely necessary) as it loads all data into the browser before doing the filtering, but I don’t know of any other way to make this work. If the first 2 lists weren’t repeating groups, you could use the same method, just referencing whatever other element or state holds the lists you’re comparing:

Result: