# Data Validation

**URL:** https://community.glideapps.com/t/data-validation/10985
**Category:** Ask for Help
**Created:** [June 17, 2020, 2:20am UTC](https://community.glideapps.com/t/data-validation/10985 "2020-06-17T02:20:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![scienter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scienter/32/2445_2.png) [@scienter](https://community.glideapps.com/u/scienter)
#### Post date: [June 17, 2020, 2:20am UTC](https://community.glideapps.com/t/data-validation/10985/1 "2020-06-17T02:20:33Z")

</div>

What kind of validation on a component would prevent a form from submitting a record that already exists in the spreadsheet?

---

<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: [June 17, 2020, 2:21am UTC](https://community.glideapps.com/t/data-validation/10985/2 "2020-06-17T02:21:11Z")

</div>

What type of data are you using to validate that it has “existed”?

---

<div class="post-metadata">

### Author: ![scienter](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/scienter/32/2445_2.png) [@scienter](https://community.glideapps.com/u/scienter)
#### Post date: [June 17, 2020, 2:22am UTC](https://community.glideapps.com/t/data-validation/10985/3 "2020-06-17T02:22:43Z")

</div>

Names for example

---

<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: [June 17, 2020, 2:27am UTC](https://community.glideapps.com/t/data-validation/10985/4 "2020-06-17T02:27:06Z")

</div>

This is kind of a prevent conflicts booking app I have done so here’s the point.

If you don’t want an existing record to be submitted again, you must have a 2-step “form” to prevent access to submission if that record has already existed, using a relation.

In the first screen, make a details layout and add entry components you would need in a normal form. You don’t need to have it all, this all depends on how you would think the UX will be best for your case.

For example, I will have a name entry writing to a user-specific column. Create a relation linking it back to the sheets that contains all the records, matching the “Names” column.

If the relation is not empty (hence a record with that name has been submitted), show a text warning the user to change the name. If the relation is empty, show the form button.

In the form, record the name and all other things you need in the previous screen, then add more entries in the form before submission.

I hope it helps.

---

<div class="post-metadata">

### Author: ![Rene](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/rene/32/30254_2.png) [@Rene](https://community.glideapps.com/u/Rene)
#### Post date: [August 16, 2021, 10:13am UTC](https://community.glideapps.com/t/data-validation/10985/5 "2021-08-16T10:13:10Z")

</div>

For our brand names, I added two more formula columns in the Google Sheet:

1. One that converts everything to LOWER case and regexreplace’d all special characters away
2. And another that does a COUNTIF comparing the 1st column with the actual data column. If count of 1st column \> 1, result = 1. If no duplicates, count = 0.

As for the logic, if 2nd column = 0, show the Submit/Edit button. If 2nd column = 1, then show the Incomplete Profile button with matching notification.

Same principle for numbers. Take out all the extemporaneous characters, keep the numbers. Compare. Voila.

---

<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: [August 16, 2021, 11:56am UTC](https://community.glideapps.com/t/data-validation/10985/6 "2021-08-16T11:56:15Z")

</div>

If you use a custom form, it’s quite easy to detect duplicates in real time and disallow form submission.

This concept app demonstrates how…

> [@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…

---

<div class="post-metadata">

### Author: ![abdurahmonxamro](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/abdurahmonxamro/32/68321_2.png) [@abdurahmonxamro](https://community.glideapps.com/u/abdurahmonxamro)
#### Post date: [July 4, 2024, 2:53pm UTC](https://community.glideapps.com/t/data-validation/10985/7 "2024-07-04T14:53:41Z")

</div>

This is impossible man.

---

<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: [July 4, 2024, 11:48pm UTC](https://community.glideapps.com/t/data-validation/10985/8 "2024-07-04T23:48:39Z")

</div>

That is indeed possible, please check @Darren_Murphy 's comment and mine for more details.
