# Calendar prevent two entries at the same day

**URL:** https://community.glideapps.com/t/calendar-prevent-two-entries-at-the-same-day/66761
**Category:** Ask for Help
**Created:** [October 4, 2023, 5:47pm UTC](https://community.glideapps.com/t/calendar-prevent-two-entries-at-the-same-day/66761 "2023-10-04T17:47:32Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Alina](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alina/32/65894_2.png) [@Alina](https://community.glideapps.com/u/Alina)
#### Post date: [October 4, 2023, 5:47pm UTC](https://community.glideapps.com/t/calendar-prevent-two-entries-at-the-same-day/66761/1 "2023-10-04T17:47:32Z")

</div>

Hello!

Is there a way to not allow user to add the second event on the same day? I mean is there a way to allow user to add only one event per day via calendar add event action?

---

<div class="post-metadata">

### Author: ![MatthewS](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/matthews/32/40533_2.png) [@MatthewS](https://community.glideapps.com/u/MatthewS)
#### Post date: [October 4, 2023, 6:20pm UTC](https://community.glideapps.com/t/calendar-prevent-two-entries-at-the-same-day/66761/2 "2023-10-04T18:20:02Z")

</div>

Sure, just need a condition on the action that only allows a new entry to be added, if an entry for that day doesn’t already exist. Use some sort of relation to check if the desired start date already has an event scheduled.

---

<div class="post-metadata">

### Author: ![Alina](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alina/32/65894_2.png) [@Alina](https://community.glideapps.com/u/Alina)
#### Post date: [October 4, 2023, 9:03pm UTC](https://community.glideapps.com/t/calendar-prevent-two-entries-at-the-same-day/66761/3 "2023-10-04T21:03:25Z")

</div>

But relation to what? I only have a date stamp after the event is submitted via calendar

---

<div class="post-metadata">

### Author: ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)
#### Post date: [October 5, 2023, 12:08am UTC](https://community.glideapps.com/t/calendar-prevent-two-entries-at-the-same-day/66761/4 "2023-10-05T00:08:10Z")

</div>

I think the complexity here lies in the fact that Glide might not be able to know which “date” you’re clicking in when using an inline action.

I would do it like this:

- Create an “Add” title bar action that links to a custom form.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…

- Create fields to store the event name, starting time and ending time.

- Create a query column to check it against your existing Events table, filter by user’s email/ID equals to the signed-in user’s email/ID, and starting time is within the same date as this row \> starting time.

- If the query is not empty (meaning the user has booked for that date), don’t allow submitting a new event, else allow booking, via an add row action.

---

<div class="post-metadata">

### Author: ![Alina](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alina/32/65894_2.png) [@Alina](https://community.glideapps.com/u/Alina)
#### Post date: [October 5, 2023, 10:25am UTC](https://community.glideapps.com/t/calendar-prevent-two-entries-at-the-same-day/66761/5 "2023-10-05T10:25:11Z")

</div>

Thank you for your input!

Yes, you are right, this is the problem exactly.

So in other words it is not possible to do via the calendar interface.

Buttons is another thing, there are lots of possibilities, of course.

---

<div class="post-metadata">

### Author: ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)
#### Post date: [October 12, 2023, 10:25am UTC](https://community.glideapps.com/t/calendar-prevent-two-entries-at-the-same-day/66761/6 "2023-10-12T10:25:36Z")

</div>

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