# How to add rules/conditions to adding table?

**URL:** <https://community.glideapps.com/t/how-to-add-rules-conditions-to-adding-table/49383>\
**Category:** Ask for Help\
**Created:** [September 15, 2022, 5:01pm UTC](https://community.glideapps.com/t/how-to-add-rules-conditions-to-adding-table/49383 "2022-09-15T17:01:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![James1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/james1/32/38876_2.png) [@James1](https://community.glideapps.com/u/James1)\
**Post date:** [September 15, 2022, 5:01pm UTC](https://community.glideapps.com/t/how-to-add-rules-conditions-to-adding-table/49383/1 "2022-09-15T17:01:11Z")

</div>

So, say there is a form for reservation. You can reserve on any date after today. You can also see current reservations. But, if you enter a date that is already reserved, you shouldn’t be able to add to the table. How do you do that? Now, it just adds it to the table. Thanks

---

<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:** [September 16, 2022, 12:19am UTC](https://community.glideapps.com/t/how-to-add-rules-conditions-to-adding-table/49383/2 "2022-09-16T00:19:34Z")

</div>

You would need to use a custom form for that.

> [@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…

If it’s just a date and not including the time, you can:

- Convert the chosen date to numerical value (say have a math column to convert it to MMDDYYYY).

- Do the same process in the table where you store existing reservations.

- Create a relation from the chosen date’s numerical value to the existing reservation dates’ numerical values.

- If the relation is not empty, then don’t allow them to add a row.

The process is much trickier when you add the time in, with periods of time.

---

<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:** [September 22, 2022, 12:22pm UTC](https://community.glideapps.com/t/how-to-add-rules-conditions-to-adding-table/49383/3 "2022-09-22T12:22:59Z")

</div>

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