I am facing a challenge that seems to be easy to solve, but I can find a work around, thought you guys might have some ideas.
Basically I am creating a booking system for several spaces and resources.
The Basics are simple, One Table where contributors can edit and choose their required date and space. ( ideally displayed in a Detailed View to act as a form or a card to fill )
The table has a button that adds a row to another table where all bookings are collected and deletes the original data from the first table so other contributors can place their own Bookings.
The question is " How to avoid the double bookings ?" Ideally in this case the button is disabled and a text is written underneath the table saying that this space is already booked.
I feel that I am approaching this in a wrong way, I tried the In() and Find() functions but this doesn’t look in each row sequentially. so I end up with finding the space in the space column and the start date in another row.
How can I write a formula that makes it check each row if the space is the same and the time is in between the start and end time then the space is booked, if not check the second row and so on until the end, if nothing is found then the space is free.
here is an example doc of what I mean.
Could you change the “share” settings on the doc you linked to so it’s open to everyone?
it should be working now ( link to the doc )
I got carried away and did this, I hope it helps
Compliments not only for the technical skill set you show here, but also the beautiful interface at the front end.
amazing @Saul_Garcia Thanks
that took things up to the next level.
I am still wrapping my head around it and as far as I understand it solves very elegantly the double bookings in terms of time. but still can’t be used for multiple spaces ?
the user can only select a date and a time but not a space, But what I don’t get is in the bookings table the spaces gets numbered not sure depending on what ?( is it the row number ? )
of course in general this could be used separately for separat spaces and that would be an easier solution.
after spending some time with the doc. It could be easily adopted for booking different spaces. ( the spaces where just counting +1 in the original doc )
Basically adding a Space list to select from.
Then filtering the new bookings to the space first then filtering this column to the time as you did.
Thanks again, I will work on this to make a booking system for external and internal bookings ( making it in sync with other bookings coming from outside of the doc ) and hopefully upload it here when finished.