# Duplicates in app

**URL:** <https://community.glideapps.com/t/duplicates-in-app/39244>\
**Category:** Ask for Help\
**Created:** [March 4, 2022, 5:04pm UTC](https://community.glideapps.com/t/duplicates-in-app/39244 "2022-03-04T17:04:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sydity](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sydity/32/39923_2.png) [@sydity](https://community.glideapps.com/u/sydity)\
**Post date:** [March 4, 2022, 5:04pm UTC](https://community.glideapps.com/t/duplicates-in-app/39244/1 "2022-03-04T17:04:39Z")

</div>

So for example my app has this cart feature. When the user browses, they can add items into the cart. But if a user clicks the button “add to cart” multiple times, it will add multiple times, which is something i don’t want to happen. I want them to be able to only add an item once and if it repeats, it will not show the repeated items in the cart. How do I solve this?

---

<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:** [March 5, 2022, 12:27am UTC](https://community.glideapps.com/t/duplicates-in-app/39244/2 "2022-03-05T00:27:46Z")

</div>

> [@sydity](#):
>
> But if a user clicks the button “add to cart” multiple times

Is this the native “add to cart” button or are you designing a form yourself?

---

<div class="post-metadata">

**Author:** ![sydity](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sydity/32/39923_2.png) [@sydity](https://community.glideapps.com/u/sydity)\
**Post date:** [March 5, 2022, 7:24am UTC](https://community.glideapps.com/t/duplicates-in-app/39244/3 "2022-03-05T07:24:31Z")

</div>

It is a button where it would add the row (details of the item) into the cart sheet

---

<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:** [March 5, 2022, 10:31am UTC](https://community.glideapps.com/t/duplicates-in-app/39244/4 "2022-03-05T10:31:32Z")

</div>

What happens after a user adds an item?  
Do you keep them on the same screen, or do you send them elsewhere with a “Go Back” or some other action?  
If you’re keeping them on the same screen, then what you could do is temporarily hide the button.  
The way to do this is as follows:

- Create a User Specific date/time column
- Create a math column using the formula `Now+5/86400` (this will give you a date/time 5 seconds in the future)
- Create an if-then-else column:  
– If user specific column is empty, then `true`  
– If user specific column is before now, then `true`
- Set the visibility on your button such that it is only shown when the if-then-else column is `true`
- Finally, when a user taps the button to add an item, include a step in the action that sets the value of the user specific column to the value of the math column
