# How can you disable a button for 24 hours after click?

**URL:** https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072
**Category:** Ask for Help
**Created:** [February 17, 2023, 11:16am UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072 "2023-02-17T11:16:23Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![Hii](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hii/32/54519_2.png) [@Hii](https://community.glideapps.com/u/Hii)
#### Post date: [February 17, 2023, 11:16am UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/1 "2023-02-17T11:16:23Z")

</div>

How can we disable a button for 24 hours after it is clicked?

---

<div class="post-metadata">

### Author: ![Carter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carter/32/45004_2.png) [@Carter](https://community.glideapps.com/u/Carter)
#### Post date: [February 17, 2023, 11:23am UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/2 "2023-02-17T11:23:36Z")

</div>

On your row item you need to add a row like “the last run of the button”, and when you click on the button, in action you do a set-up column, where you put the actual date & time.

After that you add a row with math, where you add 24hours at the last run, so you will have the last run + 24 hours.

And in your button you put a condition visibility, show only if “last run +24” is before now.

---

<div class="post-metadata">

### Author: ![Hii](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hii/32/54519_2.png) [@Hii](https://community.glideapps.com/u/Hii)
#### Post date: [February 17, 2023, 12:27pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/3 "2023-02-17T12:27:23Z")

</div>

Thank you! But how do you disable it like it just shows a notification that you only can press it after 24 hours and make it specified to that user so that other people can still press that button, and it will have the same effect?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [February 17, 2023, 12:48pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/4 "2023-02-17T12:48:16Z")

</div>

Do the same thing as Carter suggested, with the following adjustments:

- Add the columns to your User Profile table. This will make the timer specific for each user.
- Instead of a visibility condition on the button, use a custom action with two conditional branches:  
– if button can be pressed, do button action  
– else show notification

---

<div class="post-metadata">

### Author: ![Carter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/carter/32/45004_2.png) [@Carter](https://community.glideapps.com/u/Carter)
#### Post date: [February 17, 2023, 12:50pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/5 "2023-02-17T12:50:11Z")

</div>

Edit: Thank’s Darren, I forget now we can do customs actions with conditions !

---

<div class="post-metadata">

### Author: ![Hii](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hii/32/54519_2.png) [@Hii](https://community.glideapps.com/u/Hii)
#### Post date: [February 17, 2023, 1:15pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/6 "2023-02-17T13:15:40Z")

</div>

But after 24 hours they can press the button again so how does it change for each user?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [February 17, 2023, 1:20pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/7 "2023-02-17T13:20:01Z")

</div>

Isn’t that what you want?

---

<div class="post-metadata">

### Author: ![Hii](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hii/32/54519_2.png) [@Hii](https://community.glideapps.com/u/Hii)
#### Post date: [February 17, 2023, 2:19pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/8 "2023-02-17T14:19:18Z")

</div>

Then are we able to make a in-action condition with both “or” factors and “and” factor in it?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [February 17, 2023, 2:20pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/9 "2023-02-17T14:20:47Z")

</div>

No, you can’t do that. But there are other ways to get a similar effect.  
What exactly are you trying to do now?  
Is this related to your earlier question, or a different problem?

---

<div class="post-metadata">

### Author: ![Hii](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hii/32/54519_2.png) [@Hii](https://community.glideapps.com/u/Hii)
#### Post date: [February 17, 2023, 2:22pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/10 "2023-02-17T14:22:33Z")

</div>

It is a different problem. But what are the ways u can do to get the similar effect?

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [February 17, 2023, 2:25pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/11 "2023-02-17T14:25:22Z")

</div>

Okay, can you provide some more context about what you are trying to do please?

Is this in an if-then-else column, a filter, a visibility condition…?

Can you describe the conditions that you want to match?

---

<div class="post-metadata">

### Author: ![Hii](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hii/32/54519_2.png) [@Hii](https://community.glideapps.com/u/Hii)
#### Post date: [February 17, 2023, 2:30pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/12 "2023-02-17T14:30:16Z")

</div>

It is an in-action condition.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [February 17, 2023, 2:33pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/13 "2023-02-17T14:33:21Z")

</div>

Okay, well as I mentioned you can’t mix and/or conditions.  
But you can usually get what you need by applying a little creativity.  
However, I can’t tell you exactly how for your case, because you haven’t shared any details.  
If you can tell me exactly what you are trying to do, then I expect that I can give you a solution.

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [February 17, 2023, 2:44pm UTC](https://community.glideapps.com/t/how-can-you-disable-a-button-for-24-hours-after-click/58072/14 "2023-02-17T14:44:34Z")

</div>

Perhaps this might be easier if I give you an example, and then maybe you can apply that to your situation.

Lets pretend that you want to perform an action if:

- A is true, and
- (B is true OR C is true)

You can’t configure that in the action editor, so you need to apply a bit of data editor logic. So the way to do it would be to first create an if-then-else column:

- If A is not true, then false
- If B is true, then true
- If C is true, then true

And then in the action editor, your condition becomes “if-then-else column is checked”
