# Delay on button to solve refresh data delay

**URL:** https://community.glideapps.com/t/delay-on-button-to-solve-refresh-data-delay/35904
**Category:** Ask for Help
**Created:** [December 13, 2021, 2:07pm UTC](https://community.glideapps.com/t/delay-on-button-to-solve-refresh-data-delay/35904 "2021-12-13T14:07:51Z")
**Posts on this page:** 1
**Showing post:** 16

<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: [January 11, 2022, 12:36am UTC](https://community.glideapps.com/t/delay-on-button-to-solve-refresh-data-delay/35904/16 "2022-01-11T00:36:11Z")

</div>

What I did in some of my apps is basically this:

- Use a custom form to add bookings, mostly for the ability to check for duplicated bookings.

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

- Use an event picker component for users to add new bookings, so they can see what has been booked, thus reduce the chance that they will add a duplicated one.

- Use two single value columns to cast the desired starting and ending times to the table where I store existing bookings.

- The logic starts from here, I usually create 4 columns to get the relative position of the desired starting and ending times, against existing starting and ending times. What I wanna check is if the desired time is before the existing time.

- Let’s start with “Desired Starting vs Existing Starting”, if desired starting is before existing starting then true, else false. We do the same for the other 3 cases: “Desired Starting vs Existing Ending”, “Desired Ending vs Existing Starting” and “Desired Ending vs Existing Ending”.

- Then, I create two template columns to get the combined boolean for:

“Starting Check”: Desired Starting vs Existing Starting combined with Desired Ending vs Existing Starting

“Ending Check”: Desired Starting vs Existing Ending combined with Desired Ending vs Existing Ending

- If my thought is right, there are only 2 cases that a new booking can not be duplicated, they’re the two black ranges below.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/9/59977dffff5d3f07a7d7e7d043b5a0ea11843b4c.png)

- Hence, final if then else column, if Starting Check is true - true then not duplicated, if Ending Check is true - true then not duplicated, else duplicated.

---

_[View the full topic](https://community.glideapps.com/t/delay-on-button-to-solve-refresh-data-delay/35904)._
