# The X button (close overlay)

**URL:** <https://community.glideapps.com/t/the-x-button-close-overlay/76401>\
**Category:** Ask for Help\
**Created:** [September 15, 2024, 11:02pm UTC](https://community.glideapps.com/t/the-x-button-close-overlay/76401 "2024-09-15T23:02:38Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)\
**Post date:** [September 15, 2024, 11:02pm UTC](https://community.glideapps.com/t/the-x-button-close-overlay/76401/1 "2024-09-15T23:02:38Z")

</div>

one of the main screens in my app displays a collection of numbers that opens up an overlay when clicked (intended to give users a chance to confirm their selection). i have a button block with the options to Cancel or Confirm, which i had configured with custom actions.

one small problem - the overlay has an X button that cant be configured to behave the same way the Cancel does. i tried current and main screen options, but they have a back button that adds to the/has the same issue.

i can do a main screen display, but the back button won’t clear the temp data that i need to be cleared with the cancel button.

any advice would help. thanks

 ![Screenshot 2024-09-16 at 7.02.09 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/b/4b708e29b7255e5ed810062a795089a681f3611e.png)

---

<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 15, 2024, 11:36pm UTC](https://community.glideapps.com/t/the-x-button-close-overlay/76401/2 "2024-09-15T23:36:57Z")

</div>

Even if you use CSS to remove that button, users can still click outside of the overlay or swipe left to get out of that screen I believe.

Can you go into more details on why you need to clear the value? Maybe you can restructure your flow?

---

<div class="post-metadata">

**Author:** ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)\
**Post date:** [September 16, 2024, 12:02am UTC](https://community.glideapps.com/t/the-x-button-close-overlay/76401/3 "2024-09-16T00:02:25Z")

</div>

thanks for the prompt reply.

basic premise is, a slot should only be claimed by one user. on my previous post, @Darren_Murphy already advised me this may be a problem due to the race condition.

as a workaround, i am working on a multi-step process where, when clicked - this gets added to additional columns in the users table, which in turn will determine who clicked first and only allow the first clicker.

if they cancel - i need to clear these temp values to free up the slots to other users and/or clear the race condition.

---

<div class="post-metadata">

**Author:** ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)\
**Post date:** [September 16, 2024, 12:22am UTC](https://community.glideapps.com/t/the-x-button-close-overlay/76401/4 "2024-09-16T00:22:25Z")

</div>

side note: i only have this issue since there is some kind of delay from the time a user clicks on a slot and the UI gets to hide the slot (@Robert_Petitto helped me in a big way in setting this up and i have a schedule with him on wednesday. im only trying to edit what i can prior to that meeting).

when the UI gets updated (sometimes it takes up to 10 seconds for some reason) - then the clicked slot gets hidden and there’s no race condition at all

---

<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, 2024, 12:59am UTC](https://community.glideapps.com/t/the-x-button-close-overlay/76401/5 "2024-09-16T00:59:45Z")

</div>

Understood your problem. There’s lag communicating between the first clicker’s device, the “main” database, and the second clicker’s device, hence the delay. If using Make is an option, I would suggest sequential processing over there, and have a module to query the right table, to check if the slot has been reserved. If already reserved, send an email to the user to tell them it has been reserved, otherwise use an add/edit row action to give them the slot.

---

<div class="post-metadata">

**Author:** ![don\_pablo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/don_pablo/32/75929_2.png) [@don\_pablo](https://community.glideapps.com/u/don_pablo)\
**Post date:** [September 16, 2024, 2:43am UTC](https://community.glideapps.com/t/the-x-button-close-overlay/76401/6 "2024-09-16T02:43:31Z")

</div>

thanks! am trying to keep everything within glide’s internal capabilities, but might consider if ultimately ncessary.

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [September 16, 2024, 11:21am UTC](https://community.glideapps.com/t/the-x-button-close-overlay/76401/7 "2024-09-16T11:21:30Z")

</div>

What if you use the overlay type instead of slide-in?

---

<div class="post-metadata">

**Author:** ![tyler\_1](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/tyler_1/32/72341_2.png) [@tyler\_1](https://community.glideapps.com/u/tyler_1)\
**Post date:** [September 16, 2024, 6:55pm UTC](https://community.glideapps.com/t/the-x-button-close-overlay/76401/8 "2024-09-16T18:55:48Z")

</div>

I ran into this same issue and to get the effect I wanted was to use a set column values action for the button or action item that opens the overlay to begin with. Using that action to clear a value or set a value prior to opening the overly. This in effect could clear a value upon opening, or set it to something else prior to opening == the same as using a “Cancel” button that would clear a value.
