Duplicates in app

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?

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

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

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
1 Like