Problem searching data with types

Hello,

I have been struggling quite a bit with this - and I have stumbled upon others threads on this topic, with no solution. This is something very common with MySQL, I would be very surprised that BUbble would not do this.

I have a data type Job, which has a date range field.
I have a data type Booking, which has a job field (field type = job).

I want to do a search for booking whose job dates overlap with a given parameter.

But when defining the constraints in the “Do a search” option box, I cannot select any property related to the job (img below).

Is this possible to achieve ?
Thanks in advance,

Hey @Dawn

Try using the method used in this post

Let me know how it goes

Hey Ambroise, @ambroisedlg

many thanks for your reply !

This is definitely going in the right direction (using advanced filtered searches) but the situation is a bit different from the example you solved before. I cant find a way to joint the search between job dates and bookings (as the structural relationship is the other way around) - but I’ll keep searching before asking for more help.

@Dawn I think I figured it out

I want to do a search for booking whose job dates overlap with a given parameter.

What is the given parameter you’re referring to?

@Dawn

I guess you want to filter jobs depending on User’s availability, so the given parameter would be set by a start and end date filter on the page?

See this demo: https://bookingsearch.bubbleapps.io/version-test?debug_mode=true
And the editor: https://bubble.io/page?name=index&id=bookingsearch&tab=tabs-1

  • I used this plugin as for some reason the built-in date picker didn’t update the RG
  • You can make the RG Jobs invisible to users by giving it a 1x1px dimensions. It’ll still pass the data to RG Booking
  • The date pickers and “create job” buttons were used to create test jobs, you obviously don’t need that to make it work on your app

Hope that helps

Many thanks Ambroise.
Indeed this solves the problem.

I wish there was a more simple / elegant way to make joint searches in Bubble - they are simple yet powerful, and so commonly used - and they avoid a lot of data duplication.

Have a good weekend !

You’re welcome @Dawn glad I could help!