Search in two data types with relation

Hi, I’m new in Bubble and I’m having difficulty make a search to display data in a Repeating Group.

I have two data types, “locals” and “reservations”.

I want to display in the Repeating Group the information regarding the location (name, location, description, type, etc), filtering by: location, type and whether or not it is available in a range of dates (start and end).

Here’s the problem, I’m not able to make this query “list all available places between start and end dates, located in X, type X”, as availability depends on a query on reservations associated with the place.

Thank you very much for the help.

Link both datatypes with each other.

Create reservations by selecting thing as locals
Create locals by selecting thing as reservations

Now you can display anything under local related to the reservations and
Under reservations anything related to locals

You can create a field inside the “resevations” called “what local” (Type: locals) and when you create the reservation you set it as the local.
So if you set the group to: Reservations’s what local’s description, it will show directly.

As for the availability, you probably need to search something like:
Do a search for all locals minus list Do a search for reservations (time = the time you want)'s what local

There’s a way with filtering too, but the logic is the same

Probably you may need to reference a value selected from a drop down which will have list of locals

It didn’t work. One error is displayed:
RepeatingGroup Locals: Data source should be List of Reservations but right now it is a empty.

I actually want to display a list of available locations in the repeating group, not locations in a drop down.

Searching reservations is for excluding unavailable locations from the locations list only.

could you send prints from this search? it looks like the search is badly set

Good Morning!

I changed some labels, and now it looks like this:

name - text
Price - number
Reserves - list of reserves

Date Range - date range
name - text
Places - list of places

Below is a screenshot of the search:

Captura de Tela 2022-03-31 às 10.33.24

The app:

Thank’s for your help!

You need to add the “places” from the Reserves

Search places:minus list Search for Reservess’s Places

Because the minus list needs the same type of data so, places minus places

1 Like

Did not quite understand. How would it be in practice?

Can you edit directly in the app? It is editable: Testeagenda123 | Bubble Editor

Forgive me if I’m asking too much.