How to block an already booked date

in sheet 1 I have column A with the Entry date and column B with the Exit date, how do I stop it if a user enters with an existing date?

Here’s a few posts to check out. There is logic to prevent double booking.

I also have a Booking demo which is a bit simpler than the other 2 examples above. Mine is largely inspired by @Robert_Petitto.

1 Like

Thanks for everyone, but in my case I don’t have time, just dates, maybe I didn’t express myself well.
I have an entry date and an exit date, and I don’t want someone else to book with the same date, as an example
in the sheet:

Name entry date exit date situation
xyz 2/21/2020 2/23/2020 OK
abc 3/01/2020 3/05/2020 OK
def 2/21/2020 2/23/2020 Not OK (*)

(*) this dates is the same date reserved by user xyz.

My question is: How can I prevent another user from entering the same date as another user?
I need the message to appear in app: date already reserved

No, it’s not an exact example, but the concept would be very similar. One question, using your dates above, is 2/22/2020 - 2/24/2020 OK or Not OK?

Hi, Jeff, answering your question the dates 2/22/2020 - 2/24/2020 are OK, because no one has booked yet.


Since you will allow overlapping dates, then I would follow what the examples from the above posts. For example, the booking example in the Concepts app combines all three selections using a template column. Then uses the combined value to create a relation column that will return any form responses that match that same date and time. In your case, just create to date entry fields, let the user select an entry and exit date, then combine the selections using a template column. The template column will contain both the entry and exit date. Create a similar template column in the form response sheet. Then create a relation column on the original sheet to link both template columns. You can set button visibility on the form button to hide or show based on if there is any matches in the relation.

in the example of the concepts app it combines three selections and in my case I need to combine only two(dates), I am not able to create the relation with the column on original sheet, sorry for the inconvenience.

Ok, then only create a template joining 2 columns instead of 3 (entry date column and exit date column)

Thanks very much Jeff, now it is right.

1 Like