# Creating an Undo button

**URL:** https://community.glideapps.com/t/creating-an-undo-button/45454
**Category:** Ask for Help
**Created:** [July 28, 2022, 5:48pm UTC](https://community.glideapps.com/t/creating-an-undo-button/45454 "2022-07-28T17:48:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![baldwin\_kay](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/baldwin_kay/32/45098_2.png) [@baldwin\_kay](https://community.glideapps.com/u/baldwin_kay)
#### Post date: [July 28, 2022, 5:48pm UTC](https://community.glideapps.com/t/creating-an-undo-button/45454/1 "2022-07-28T17:48:35Z")

</div>

Is it possible to create a button to undo the action of the last button used. For example I have a tracking app that mainly uses the increment action button, so if a button was clicked accidentally is there a way to make a button to undo that action. Also is it possible to create a date log of each time one of those button is clicked.

---

<div class="post-metadata">

### Author: ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)
#### Post date: [July 28, 2022, 9:32pm UTC](https://community.glideapps.com/t/creating-an-undo-button/45454/2 "2022-07-28T21:32:33Z")

</div>

Hi Baldwin, can you explain the use of your Increment Action button in detail?

---

<div class="post-metadata">

### Author: ![baldwin\_kay](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/baldwin_kay/32/45098_2.png) [@baldwin\_kay](https://community.glideapps.com/u/baldwin_kay)
#### Post date: [July 28, 2022, 10:29pm UTC](https://community.glideapps.com/t/creating-an-undo-button/45454/3 "2022-07-28T22:29:37Z")

</div>

the increment action add a tally of 1 to procedures that are completed. It simply just used as a counter button.

---

<div class="post-metadata">

### Author: ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)
#### Post date: [July 28, 2022, 10:43pm UTC](https://community.glideapps.com/t/creating-an-undo-button/45454/4 "2022-07-28T22:43:13Z")

</div>

Maybe what you can do is use 2 buttons and add visibility to them.

One button for completing the action - and set the visibility to “SHOW WHEN INCREMENT COLUMN IS EMPTY”

Create another button for UNDO. Set the action to - Clear value of that increment column - and set the visibility to “SHOW WHEN INCREMENT COLUMN IS NOT EMPTY”

---

<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: [July 29, 2022, 1:01am UTC](https://community.glideapps.com/t/creating-an-undo-button/45454/5 "2022-07-29T01:01:23Z")

</div>

If the counter does not ever reach 2, you can use Hassan’s method. If it can reach 2 or more, you can use an increment action but use a negative value (minus 1).

---

<div class="post-metadata">

### Author: ![Hassan\_Nadeem](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/hassan_nadeem/32/72956_2.png) [@Hassan\_Nadeem](https://community.glideapps.com/u/Hassan_Nadeem)
#### Post date: [July 29, 2022, 10:04am UTC](https://community.glideapps.com/t/creating-an-undo-button/45454/6 "2022-07-29T10:04:07Z")

</div>

And for the date log - create a new column for undo time stamp, and on the undo button’s action set the column value of timestamp to current date and time. In that way you will see when was the last time the undo button was pressed.
