# How to block an already booked date

**URL:** <https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768>\
**Category:** Ask for Help\
**Created:** [February 19, 2020, 9:01pm UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768 "2020-02-19T21:01:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adalberto\_Ponzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adalberto_ponzo/32/3657_2.png) [@Adalberto\_Ponzo](https://community.glideapps.com/u/Adalberto_Ponzo)\
**Post date:** [February 19, 2020, 9:01pm UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768/1 "2020-02-19T21:01:25Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 21, 2020, 4:20am UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768/2 "2020-02-21T04:20:05Z")

</div>

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

> [@Room Booking that prevents conflicts](https://community.glideapps.com/t/room-booking-that-prevents-conflicts/4288):
>
> I’m starting to work on a room booking app and was wondering if anyone has figured out a good way to create a way to prevent conflicting days/times (so that if I book a meeting on Monday from 9-10AM, this time slot can’t be booked by someone else). I know I could create a choice component that lists the possible days/times and then can probably figure out a way to remove choices as they are taken, but this doesn’t take into account all possible time choices (sometimes people will book on the 15…

> [@Agenda.io | The new Booking App spiral\_calendar](https://community.glideapps.com/t/agenda-io-the-new-booking-app/4608):
>
> Hey, Gliders! Let me introduce you my new sendbox called [Agenda.io](https://agendamentomodelo.glideapp.io)! Inspired and very similar with [Booking App](https://bookingapp.glideapp.io/) by @Robert_Petitto. It’s just a test app, that’s why forget your judgment about it. Tks. That’s a test app where you can: Choose from 2 “companies” inside-app Choose many options/items Automactly see the availability of them See calandar just below and confirm the form and schedule Admin View with some other features to simulate: Choose days to block in your agenda Choose your avai…

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

> **[Concepts](https://concepts.glideapp.io/)**
>
> Made with Glide from a Google Sheet, without writing any code.

---

<div class="post-metadata">

**Author:** ![Adalberto\_Ponzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adalberto_ponzo/32/3657_2.png) [@Adalberto\_Ponzo](https://community.glideapps.com/u/Adalberto_Ponzo)\
**Post date:** [February 21, 2020, 11:46am UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768/3 "2020-02-21T11:46:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 21, 2020, 1:26pm UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768/4 "2020-02-21T13:26:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Adalberto\_Ponzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adalberto_ponzo/32/3657_2.png) [@Adalberto\_Ponzo](https://community.glideapps.com/u/Adalberto_Ponzo)\
**Post date:** [February 25, 2020, 1:32pm UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768/5 "2020-02-25T13:32:59Z")

</div>

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

Thanks

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 25, 2020, 8:04pm UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768/6 "2020-02-25T20:04:06Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Adalberto\_Ponzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adalberto_ponzo/32/3657_2.png) [@Adalberto\_Ponzo](https://community.glideapps.com/u/Adalberto_Ponzo)\
**Post date:** [February 27, 2020, 12:53pm UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768/7 "2020-02-27T12:53:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [February 27, 2020, 1:08pm UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768/8 "2020-02-27T13:08:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Adalberto\_Ponzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/adalberto_ponzo/32/3657_2.png) [@Adalberto\_Ponzo](https://community.glideapps.com/u/Adalberto_Ponzo)\
**Post date:** [February 27, 2020, 2:04pm UTC](https://community.glideapps.com/t/how-to-block-an-already-booked-date/4768/9 "2020-02-27T14:04:16Z")

</div>

Thanks very much Jeff, now it is right.
