Repeating group filter based on 2 different databases


I have 2 databases
1 “Basic Sample information” containing(MonsterBasis)

  • Unique Sample ID
  • Name grower
  • Variety

2"Measurement results" containing: (monstermetingen)

  • Unique Sample ID
  • Unique measurement ID

I have a selection field for Grower

Now I want my repeating group of measurement results filtered by Grower!
I know how to set up the filtering in the RG for the same thing (like Ras, Type monster and Mutant), but not for an other thing, I can’t figure it out…

I have tried a lot but I need the help of one of the colleague bubblers…

This Is what I have at the moment:

Thanks a lot for your help!

anyone that give me a push in the right direction?

Your advise is much appreciated!!

It looks like the field that’s common between each is Unique Sample ID, correct?

In bubble they call each of these data types. In more generic terminology that applies to all relational databases, these two things would be called tables.

So it sounds like you have two data types in your app’s database and you are looking to match the results from each using a common field called Unique Sample ID

Look up the filter option in bubble.

In your case this might look like

Do a Search For Monstermetingen:filter

Under Filter
Advanced : Do Search For MonsterBasis

Under Do A Search For MonsterBasis
Unique Sample ID: This Monstermetingen’s Unique Sample ID
Name grower: 'Input Name of Grower’s Value`

Another thing you might want to consider is creating a new separate data type in addition to monstermetingen & MonsterBasis in your database. In this case, you would add a have monstermetingen & MonsterBasis & samples.

The Samples datatype would contain all of the Unique Sample IDs. Then, you could associate the other data type (monstermetingen & MonsterBasis) with each sample.

There are some advantages to this

  • This avoids a potential inconsistency between Unique Sample IDs that can sometime occur if you aren’t very diligent about how you are updating your db in your app.
    The way it avoids this is that monstermetingen & MonsterBasis since they both now reference the same DB entry.
  • Its allows for a faster searching and a more streamlined approach when writing out your expressions.

Thanks a lot @jon2 for your reaction and clear explanation!

I’m try to do the first part first…
but I’m lost somewhere here:

Do a Search For Monstermetingen:filter

Under Filter
Advanced : Do Search For MonsterBasis

Under Do A Search For MonsterBasis`

This part is nut clear enough for me where and how to fill in:
Unique Sample ID : This Monstermetingen’s Unique Sample ID
Name grower : 'Input Name of Grower’s Value`

This is what I did:

I can’t only put: Advanced: Search for MonsterBasis

Could you please help me with the last part as I think I’m close by the solution…

About the second part I’m also very interested how to set up that way.
I found out the bubble is not very fast in showing “search by” results

How do I made the association?
data Type Samples
Field UniqueMeasurementID (=Monstermetingen Unique Measurement ID)
Field UniqueSampleID (=MonsterBasis Unique Sample ID)

So every time a measurement is entered I will update the measurement thing (as I do know) AND the Sample thing as above?

Thanks again for your help!

How do I made the association?
data Type Samples
Field UniqueMeasurementID (=Monstermetingen Unique Measurement ID)
Field UniqueSampleID (=MonsterBasis Unique Sample ID)

When you create a database field, you may set the field type to text, number, date, etc. You can also set the type to another data type (table) in your database such as Monstermetingen or MonsterBasis. These are called ‘custom types’ and are other things in your database.

Your custom types are found below the built-in types. Scroll down to the bottom to find your custom types when selecting the field type from the dropdown.

As far as how you associate them.
You can do this manually in the data tab under ‘app data’ in the bubble editor. In practice, you’ll want to be able to do this in your app too. For example: In your bubble workflows you can:

Step 1) create a sample thing in one step
Step 2) update a MonsterBasis thing
MonsterBasis's associated Sample = Result of Step 1 Create A Sample
Step 3) update a MonsterMeetingen
MonsterMeetingen's associated Sample = Result of Step 1 Create A Sample

What you’ve got going on here with Samples is slightly beyond the basics of just storing stuff in the db. Samples is a ‘carrier data type’ which the things inside do not really store much on their own, but really function to store the relationship between two other things MonsterMeetingen and MonsterBasis

You’ll likely want to learn more about the basics of relational databases. I’d highly recommend checking out Salar’s Udemy Course to which covers more more on the database and this kind of thing.


I have been searching for a solution to a similar problem and came across your detailed response which has helped.

With the above, in my app example I am wanting to create a new attraction (or Place) record (E.g. a fairground) which has assigned to it up to 3 categories (E.g. family, outdoor activities) - this is taken from an Option set. Each attraction is also assigned an Area (E.g. a town).

Within the app I want to list all of the categories that have attractions within certain areas.
I have been unable to do this through usual filters as there is no direct relation between a category and an area, only through the attractions data type. Therefore I am trying to implement a new ‘carrier’ data type in line with your suggestion but am struggling with the setup.
When I create a new attraction, I have a workflow that creates a new thing within the Attractions data type and then also creates new records within the carrier data type using the UID from step 1. I am creating a new record for each category.

Am I doing this correctly or do I need to create the linked record when creating the carrier record? I currently don’t have these as fields within the carrier data type.

When it comes to correctly displaying the filtered list within the app I am thinking that I need to use the carrier data type within a repeating list and then filtering by only showing records where the category has more than one record within the defined Areas.
I am struggling to get this to work. I have got a far as grouping by Category but can’t work out how to filter by the Area although I am able to display the Areas each Category has so I know I’m half way there!

Any help would be appreciated.