Auto Create Bookings Slots for every date

Hello, I’m trying to create a booking system that has a calendar strip, upon clicking which you can see 24 1-hr time slots for a single date. The user can click on a slot to make a reservation. Each time slot will also show capacity. Not sure how I can auto generate time slots for every day? So far I haven’t found any solution… Ideally, I would also want the app to auto delete all the old time slots before this month.

I want my app to look like this:

The only way I can think of to display time slots for each day like that would be to have a collection of dates that you can then set up a many-to-many relationship with the time slots. You’d have to figure out the best way to connect each day to all the time slots. Then you can control the availability with a simple true/false field on the time slot record.

So two collections: one of dates, one of time slots. Then on the booking screen like you have shown above, you just filter the list of time slots to only show the slots for the day that corresponds with the button that is pressed.

Adding all the time slots initially would likely take some time, but you can probably set up a back-end page of the app to let you do it pretty quick with a list + button.

I suppose you could also add true/false fields to the dates collection for each of the time slots that you could then toggle to keep track of what’s booked and what’s not, but I feel like that would put more limitations on how you can display the data, at least in Adalo.

There are a few ways to approach this and it really depends on your use case, so explain the app in a bit more detail, the different user or business sides and general function that is needed.

In it’s simplest form I would lean towards a Calendar Strip and collection of datestamps. You can make this in excel and upload in bulk.

A bit more detail is needed.

Thanks Rozza! It’s basically a swimming pool reservation app for my building. There are two types of users: residents and building staff. The staff will control the capacity of each timeslot (say 10 people per 30m slot) and the user can just click on the available time slot to make a reservation.

I was thinking of something similar and tried uploading 30m timeslot for 6 months but it turned out that there will be close to 10k entries…

Hi Cameron, thanks for your reply! Can you pls elaborate more about setting up a back-end page? I was thinking of the same thing but don’t really want to manually add all the time slots…

Sure, what I meant was a page in the app itself that only an admin has access to where you can just click the date in question, then click an “add time slots” button that creates the relationship between the date and all the time slot records. You could do this in advance as far as you would like. The same page could have the functionality to delete past dates from the database so you aren’t floating too many records at once, if that’s a concern.

I haven’t done anything like it personally so I can’t promise it would work that way, but that’s where I would start.

  1. If the 10k records are filtered to “two weeks from now” or similar then your performance should be OK.

Then each session (timeslot) has a relationship to users. When a user reserves a slot they are added to that session. Use some front end logic so a user can only reserve if the count of reserved Swimmers <10.
2)
You could also use a JOIN table instead of the above

Another option is to use a nested list…
Calendar Strip along the top and a list of Timeslots ( this is a collection of only times… So 24 records for 24 hour long sessions) just like your screen shot

Combine the date selected in the Calendar strip with the time (decimal) from the Timeslots list and create a SessionBooked record.
Use a nested list to connect your Timeslots and SessionBooked

Number 1 would be the easiest IMO.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.