Hi there,
I’m having trouble - got stuck… hopefully someone could help please???
So I’m creating a function in bookings
in that function there is a time and day that already been selected,
and I need to find “who’s available” for that date…
I’ve been using TopCal plugin for the bookings and scheduling,
but I’m stuck in doing this (searching for users that are available at the specific time and day…)
So let’s say for example: there’s a booking on April 27th at 9:15pm that needs to be “covered”
and I need to find a user that is available on that specific day and time…
I’m really stuck with this, anyone can help or has any idea where to go with this?
Thank you in advance!
There can be a couple different ways. Approximately how many Users will you be searching across for availability? (1-10, 10-100, thousands, etc)
Also, are the Users setting their availability using a Pattern, such as Mondays 9-5, or only with Specific Date Range Availability? (can help with some speed optimizations if the latter)
If it is a small number we can do some logic on page, if it is a large number and searching is a key function in the app then it may be more efficient to save available time slots directly on a User’s Schedule
Hi gf_wolfer and thank you for the reply,
It’s about 1 - 10 users, they are setting availability by pattern but, I’ve put in all the methods that were in the documentation, like specific days, blocking specific days, etc… (plus they will be having dates that are already booked as well)
My main reason for this function, is for example, there is a date that’s already got booked but the user doing the booking could not do it, so I’ll need to find someone else (another user) to book it with, so I want to create repeating group that will show me “who’s available” for that specific day and time…
@bizyland I don’t know why you are using the plugin but it can solve without a plugin too.
Store the user availability time in the table. For example- If the user ‘A’ have availability
Mon- 9:00AM - 5:00 PM
Tue- 9:00AM - 5:00 PM
Wed- 9:00AM - 5:00 PM
Thur- 9:00AM - 5:00 PM
Fri- 9:00AM - 5:00 PM
Sat- 9:00AM - 5:00 PM
Sun- 9:00AM - 5:00 PM
Considering there is a fixed event time for 30 min.
So when the user selects the date and time, find the what is the day for that day for ex- Monday, Tuesday etc.
and check which user is available ( you also need one more table to store booked slots too ) and show the user.
User is available - Is the time slot available in the User’s availability Table and the Time Slot not available in the user booked slot.
Got it, one way to do this is have a repeating group of those 1-10 users on page somewhere (tiny and behind other elements) with a Get Time Slots element in each row. Then using the Orchestra plugin you can run a workflow within each repeating group cell to check the Time Slots and only show Users in another repeating group whose Time Slots (with the date parameters) count is greater than 0.
There might also be a way without the Orchestra plugin and using Custom Event Loops and the TopCal Action GetAvailableTimes, but I haven’t fully tested that yet.
This can get a little in depth and confusing to build out, so if after trying some of the above you still need assistance let me know and I might be able to put together an example later this week.
Hi there,
I’ve been trying to build what you wrote, but I’m not really knowledgeable on the Orchestra plugin, and I wasn’t sure on how to make the search by time slots…
I’m still pretty new at bubble…
would you maybe be able to create a demo of this please?
or maybe give me some more detailed steps on how to do this function?
I’m kinda stuck with this…
So here’s the breakdown of using the Orchestra Plugin with the TopCal plugin to get a list of Available Users:
Put a Repeating Group on page to load all your Users who have a relevant schedule
Within the Repeating Group add a GetAvailableTimes Element and a Musicians Element
- This repeating group can be tiny and put behind other elements so that it cannot be seen. But make sure it is visible on page load and set to Full List - as we need to load all the Data and Elements in the cells for this to work properly
Add a Maestro Element somewhere on the page, not within the Repeating Group we just made
Set the relevant Fields in the Get Available Times element (yours will be Between These Dates and filter for the specific day the person is searching for)
Create a Custom State somewhere on page to be a List of Users - we will populate this State with Users who have available times from this Workflow. This is a workflow that will run within every Cell of your Users repeating group, and all it does is recognize if the GetAvailableTimes element has any times (availability), and if it does then it adds the User (schedule in my example) to the Custom State list
Create a Button or Workflow to kick off the ‘Finding’ of available Users. In your scenario you mentioned a User may have no available times, so you could have a ‘Search for other Users’ button that kicks off this search
Hi gf_wolfer,
First of all thank you for all your help and input on this subject!
I tried to follow every step as you showed and explained (basically copied it), but the part of finding ‘who’s available’ by getting available times didn’t seem to work for me,
I think I didn’t follow step number 4 correctly…
I followed all the instructions as much as I could (showing in the pictures)
When I press my ‘run’ button (to find “who’s available”) - it only populates one user -
but that user is not really available (already has bookings at that time)
If I do this (in the picture below) it populates a list of all the users - but still it doesn’t show them by availability (meaning users that show up as a result - are not really available at that time)
This is what I did for step 4 (my BookingStartDate and BookingEndDate are both dates, that are saved as part of my TopScheduleBookings database (created when someone creates a booking)