FORUM COMMUNITY IDEAS SHOWCASE LEARNING CENTER

Create time slots and save it to database


#1

Hi,

I am trying to create an app, that allows user to input starting date/time, closing date/time as well as slot time in minutes. Is it possible in bubble to calculate time slots and show it in a table/list?

Example:

Starting time 2/9/2018 12.00
Closing time 2/9/2018 13.00
Time slots in min 20

Output should be
12.00 20 min Book
12.20 20 min Book
12.40 20 min Book

Any bubble file would be greatly appreciated.

image


#2

Although it is more complex initially, you will be far better off storing the “pattern” rather than every instance.

So store start/end/repeat interval - and then display the slots with bookings.


#3

@NigelG
Have you tried the approach you are suggesting? I faced the problem of looping (and/or creating temporary thing on the fly, without actually querying DB) through anything to check the availability an then display it to the customer. If the system was supposed to have fixed number of sessions per day - that could be done by the workflow with plenty of steps or by designing the page with many buttons/whatever representing bookable resources - but fixed number. Then just showing/not showing the ones, that correspond to the specific hours in the day. And lets not forget checking against already booked sessions on top of that…

But since schedules can be different - eg. Monday 10 sessions every 1h, Tuesday only 3 sessions, and Sunday 24h of sessions to book (just an example) - I can’t imagine using above solution… RG/nested RG? How to populate it by rows and columns representing days/hours/events/whatever if there is no existing Thing in DB and expression builder is limited?
I think that’s why people are asking how to populate the database with slots each time the “booking system” topic appears here - there seems to be a problem with displaying the schedule after in some easy and logical manner (i may be wrong).

How did you or how would you approach it?


#4

Hi there,

Yes, I have been building up a recurring event app slowly, based on Martin Fowler’s analysis pattern.

The changing patterns can be achieved by linking events to parent events but it can get messy quite quickly.

Until recently the “display” part was very complex as you say. However the numeric list function from the toolbox now allows you generate lists on repeating groups that are not on the database.

Will share at some point.


#5

I built a booking system using @NigelG’s approach. It’s quite inelegant if you intend to do a lot of dynamic things with the individual bookings, but it’s still the most workable solution I’ve seen on Bubble that doesn’t involve paying for a scheduling system to integrate.