Removing or prevent duplications of entries

How do you remove duplications?

Basically, a user enters an item and can keep reentering the same item. How do I prevent this? I can show using formulas that an item is a duplicate but I can not say pick the last occurrence or the first occurrence of the duplicated item and ignore the others.

app link: https://berserk-quilt-3114.glideapp.io/

spreadsheet: duplication - Google Sheets

Any solution?

Here is a use case app’

One way is to have a 2nd sheet to store user submission, check for duplicate, if duplicate found, return a message to user “record exist” , if not duplicate, add it to final sheet.

Hey! I have the same issue with Crossfit bookings.

What I have now is the following, let’s say A,B,C are different bookings and with COUNTIF formula I detect the duplicates:

A —> 2
B —> 1
C —> 1
A —> 2

What I want is to delete ONLY one A record. Because normally the people don’t wait the seconds before the class book appears on the app and they book twice thinking they haven’t booked it correctly.

How can we do that automatically? Not filtering manually, not removing duplicates manually.

Thank you in advance!

Rather than trying to figure out how to automatically delete the duplicates, maybe we should try to figure out the delay in getting records to show up in the app. Can you explain your process a little bit? Adding a row should be instant, especially if you are using Glide functions instead of sheet functions. Then you should be able to use a relation or something like that to determine if a new booking exists, and then hide the button to prevent a user from submitting another booking. This should all be happening instantly of everything is set up correctly.

Yes, that’s true. I combined Glide functions with Sheet functions and I am not sure if I can do everything on Glide functions.

Externally: a user can book a class if the class is not full and if he has class bonuses available to book the class.

Internally:

  • I have an excel tab to collect at what time the user has booked and what class has booked.
  • Then I have another one where I compare the time and date of the class with the time and date of the booking. And I count the number of classes that the user has book that week.
  • Another one to collect the real time occupation.
  • And a final one with the information of all the clases with the real time occupation. Also I recognize if a class has finished and I put it on the next week.

Thank you in advance!

If you arer having a field populate data when an item is added then make that item’s visibility determined by the field and if it is empty display item.

Use the built in Actions
fix-duplicate-entry

2 Likes

Are you using this in an on submit action? Why do you need a delete row action in there?

Glide creates the new row when the user clicks on submit, regardless of whether or not the conditions are met. The action code tells Glide to delete that newly created row and then takes the user back to resubmit the form. Then Glide notifies the user that the data they input is already in use.

Wouldn’t the Add Row potentially add a duplicate row if the name truly is new?

1 Like

hi @adelhammoud and how would you do that precisely? I am trying to solve the same issue but can’t wrap my mind around it to know what to query, lookup, etc. thanks!

This is a very old thread.
The canonical way to prevent duplicates is to use a Custom Form.

2 Likes