# Prevent duplicates from text entry

**URL:** <https://community.glideapps.com/t/prevent-duplicates-from-text-entry/49233>\
**Category:** Ask for Help\
**Created:** [September 13, 2022, 3:46pm UTC](https://community.glideapps.com/t/prevent-duplicates-from-text-entry/49233 "2022-09-13T15:46:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [September 13, 2022, 4:22pm UTC](https://community.glideapps.com/t/prevent-duplicates-from-text-entry/49233/2 "2022-09-13T16:22:18Z")

</div>

It’s not good practice to add a row and immediately delete it afterwards. It’s most likely adding a row, then your On submit is possibly comparing Product Code to itself, so it will always match and take the Delete path. Also, your Else is essentially adding an Add Row action to a form that already adds a row, so if it did work, you would end up with duplicate rows each time you submit. When using a native form, don’t ever use an Add Row action On Submit, unless you want to add a row to the form table as well as add a row to a different table. In most cases, it’s not necessary and redundant.

I would create a Custom Form for this use case. Then you can check for a duplicate while filling out the form and hide or show the submit button as needed.

> [@How do I create a custom form?](https://community.glideapps.com/t/how-do-i-create-a-custom-form/25014):
>
> I’m just dropping this here so I have something to refer people to when they ask. This is a simple concept app (copyable), that demonstrates the following techniques: Building custom forms for adding and editing list items (as an alternative to the native forms provided by Glide) Preventing duplicate new entries using [User Specific Columns](https://docs.glideapps.com/all/reference/data-editor/user-specific-columns) and [Relations](https://docs.glideapps.com/all/reference/data-editor/computed-columns/relation-column) Enforcing mandatory input items The use of visibility conditions and user specific booleans to control user flow There is nothing particula…

---

_[View the full topic](https://community.glideapps.com/t/prevent-duplicates-from-text-entry/49233)._
