Forum Academy Marketplace Showcase Pricing Features

Complex booking

I am struggling a lot with the problem that I will explain below. I am in need of a solution as I couldn’t solve it by myself.

I am making software for car rental, and I need the following:

I have a thing called CAR which contains all the info regarding cars and conaint a list of fields CAR UNIT.

CAR UNIT contains a list of BOOKINGS.

What I need is a display of available CARS. It needs to check each CAR, CAR Unit, and Each booking. And if no current CAR has a CAR unit that does not have any booking that overlaps with the current booking date, it needs to display that car.

Please let me know if someone can help me.

I’ve sent you a DM. Please check.
Cirstin V

1 Like

I will right now, thank you!


Did you get an answer via DM? Worth sharing here if so for future users’ reference (it’s not a particularly easy problem, but it’s one many of us will come up against).

There are probably a number of approaches to this but one option is as follows:

  1. In this instance it’ll make life easier if your links work both ways - i.e. cars <–> car units and cut units <–> bookings.

  2. The key type in your query is car units as they’re the thing your users are ultimately interested in the availability of - the car type is basically just a grouping.

  3. In your query you can do something like this:


There may be a better way, but does give the result you want - a list of CARS available on a particular date.

If you need any additional help, let me know.


1 Like

I’m having a similar issue also with a rental type platform. I have products, productUnit and bookings.

I want to only display the products not every single unit, however I only want products to display that have availability between a certain date range. That information ofcourse is stored in the bookings.

The logic is easy, give me the products that have one or more items that don’t have any bookings that overlap said start and end dates.

Putting that logic in bubble in a way that is performant and does not chew up a million WU’s is a whole nother story.

I can do it with a search and some advanced filtering but it is neither performant or efficient on WU’s

1 Like

Question : Does the minus list require all items from both searches to be pulled. Similar to a filter?

Hi Chad. In my screenshot, the first search is returning all car units, but that will be a much smaller list than bookings. The second search is only those bookings where start date is before or end date is after selected date, so again quite a small subset of bookings. There shouldn’t be too much on page filtering going on.

I guess the key thing is to avoid returning too many bookings, as that will potentially be a big table.

As I said, it’s probably one of many approaches, but hopefully helps towards a workable solution.


I created, I guess could help you send me dm if you want more informations…