# Solution to Prevent Duplicate Entry

**URL:** <https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467>\
**Category:** Ask for Help\
**Created:** [October 22, 2020, 7:32pm UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467 "2020-10-22T19:32:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alsobrooks57](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alsobrooks57/32/11906_2.png) [@alsobrooks57](https://community.glideapps.com/u/alsobrooks57)\
**Post date:** [October 22, 2020, 7:32pm UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/1 "2020-10-22T19:32:41Z")

</div>

Is there a way to prevent users from add duplicate data in to a form?

For example, if they are adding a name - “Bob” - but “Bob” already exists in that column then they get a message asking them to enter a different name.

I’ve see a couple of threads that touch on this, but did not see a clear solution.

Thanks in advance!

---

<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:** [October 22, 2020, 10:04pm UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/2 "2020-10-22T22:04:30Z")

</div>

To do this, we must make a user-specific column outside a form, make a relation from that column to the list of usernames already existed. If relation is not empty then tell them to pick another name, else show them the form button to collect that entered name via columns component.

---

<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:** [November 16, 2020, 3:16pm UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/3 "2020-11-16T15:16:54Z")

</div>

@ThinhDinh - would you mind expanding on this a little please?

My situation: I am using an allowed email list to restrict access to my app. I would like to allow existing users to “invite” new users by adding to the allowed email list, but I want to prevent them from creating duplicate entries. What you’ve described here I think is what I need to do, but I’m struggling to get my head around it

---

<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:** [November 16, 2020, 3:46pm UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/4 "2020-11-16T15:46:42Z")

</div>

Expect a post from me on how to prevent duplicate entries and update entries using actions before the end of this week.

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [December 5, 2020, 1:23am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/5 "2020-12-05T01:23:11Z")

</div>

Was there ever a follow up to this? Facing similar circumstance.

> **Summary**
>
> > [@ThinhDinh](#):
> >
> > Expect a post from me on how to prevent duplicate entries and update entries using actions before the end of this week.

---

<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:** [December 5, 2020, 2:15am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/6 "2020-12-05T02:15:25Z")

</div>

I was hesitating because it involves adding a lot of user-specific columns, and may not be useful for cases with big forms, but I will make a video anyway, when I have time 😢

---

<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:** [December 5, 2020, 4:43am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/7 "2020-12-05T04:43:06Z")

</div>

I have a working implementation of this.  
I’ll post a summary later today.

---

<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:** [December 5, 2020, 4:46am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/8 "2020-12-05T04:46:27Z")

</div>

Actually, @Eric_Penn have a look at [this thread](https://community.glideapps.com/t/prevent-duplicates-in-allowed-email-list/18724). What I have is essentially what was discussed there.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [December 7, 2020, 1:22am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/9 "2020-12-07T01:22:31Z")

</div>

Here is a working solution for preventing duplicate entries as well as giving you the ability to extract the first part of an email to use as user name. I did this on the user profiles sheet as that is where it’s most needed.

 ![sss](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/3/63b6f1bfe21a83449252df09927302d70867bb9f.jpeg)

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [December 7, 2020, 1:25am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/10 "2020-12-07T01:25:54Z")

</div>

> **[time stamp increment](https://flying-can-2202.glideapp.io/)**

Anyone is welcome to make a copy

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [December 7, 2020, 2:29am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/11 "2020-12-07T02:29:53Z")

</div>

Thank you Wiz! I am currently using a form to capture. Would have to switch to details screen correct?

> **Summary**
>
> > [@Wiz.Wazeer](#):
> >
> > Here is a working solution to preventing duplicate entries as well as giving you the ability to extract the first part of an email to use as user name. I did this on the user profiles sheet as that is where it’s most needed.
> > 
> > ![sss](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/3/63b6f1bfe21a83449252df09927302d70867bb9f.jpeg)

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [December 7, 2020, 2:37am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/12 "2020-12-07T02:37:31Z")

</div>

No…a form you can place on any screen, including inside an inline list. Just create a relation between the form sheet and mNames sheet…and do the LKUPs I carried out on the uP. The form is not our concern…its the sheet to which the form will be writing the info. Once the relation is created you can then pull up the same ITE on the form to indicate whether name already taken.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [December 7, 2020, 2:41am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/13 "2020-12-07T02:41:51Z")

</div>

Oh lol…damn! might not work lol…I did mine on uP…let me get back to you…Form needs to be submitted lol ! Let get back to you…sorry!

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [December 7, 2020, 3:44am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/14 "2020-12-07T03:44:40Z")

</div>

Nope, I can’t even get the formula to work on the form…Let me try with another formula…but regardless…for form to show a match it has to have two names on it in the first place…so on a form this will work with the 3rd entry…which is useless to us. I am sorry…I don’t think I can even get the switch formula to work on the form. I will give it a try and get back to you.

Only reason works on uP because we are using a button and not a form

UPDATE  
Okay I have good news! I used a different logic for the form…works fine…!

---

<div class="post-metadata">

**Author:** ![Eric\_Penn](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/eric_penn/32/73888_2.png) [@Eric\_Penn](https://community.glideapps.com/u/Eric_Penn)\
**Post date:** [December 7, 2020, 5:05am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/15 "2020-12-07T05:05:25Z")

</div>

Legendary.

> **Summary**
>
> I need to start using REGEX more. Very powerful thank you!
> 
> ```
> ={"username";ArrayFormula(REGEXREPLACE(A2:A,"@(.*)",""))}
> 
> ```

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [December 7, 2020, 5:32am UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/16 "2020-12-07T05:32:00Z")

</div>

Yes you should…It is very powerful and useful like the array formula.

---

<div class="post-metadata">

**Author:** ![Pablo\_books](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablo_books/32/2110_2.png) [@Pablo\_books](https://community.glideapps.com/u/Pablo_books)\
**Post date:** [December 7, 2020, 4:33pm UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/17 "2020-12-07T16:33:46Z")

</div>

I recommend you empty out your rows… 😬 The first time I see this error:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/9/69bcf74c6cf4c0746ec881177f5cac9dc059bce6.png)

---

<div class="post-metadata">

**Author:** ![Pablo\_books](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/pablo_books/32/2110_2.png) [@Pablo\_books](https://community.glideapps.com/u/Pablo_books)\
**Post date:** [December 7, 2020, 4:37pm UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/18 "2020-12-07T16:37:16Z")

</div>

@ThinhDinh Also, how in the world do you have 516 out of 500 rows?!!  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/d/f/df95e529d830de106e87744104c82dfa96e6a3bb.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [December 7, 2020, 4:40pm UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/19 "2020-12-07T16:40:26Z")

</div>

It will still count row, but what’s visible in the app will be limited to the first 500 rows.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [December 7, 2020, 5:12pm UTC](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467/20 "2020-12-07T17:12:21Z")

</div>

🤣

[Next page](https://community.glideapps.com/t/solution-to-prevent-duplicate-entry/17467.md?page=2)
