# Checking for duplicates of an entity AFTER adding said entity

**URL:** https://community.glideapps.com/t/checking-for-duplicates-of-an-entity-after-adding-said-entity/72574
**Category:** Ask for Help
**Created:** [April 14, 2024, 3:24pm UTC](https://community.glideapps.com/t/checking-for-duplicates-of-an-entity-after-adding-said-entity/72574 "2024-04-14T15:24:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![MattGlides](https://avatars.discourse-cdn.com/v4/letter/m/53a042/32.png) [@MattGlides](https://community.glideapps.com/u/MattGlides)
#### Post date: [April 14, 2024, 3:24pm UTC](https://community.glideapps.com/t/checking-for-duplicates-of-an-entity-after-adding-said-entity/72574/1 "2024-04-14T15:24:07Z")

</div>

We currently have row owners in place so one customer cannot accidentally see another customers vehicles and for added security.

The issue is we do not want two separate customers to have the same license number as this causes errors in the system when they go to fill-up.

How can I do a check for duplicate license numbers at fill-up (currently a customer drives in, the attendant enters the license number, and it does a relation to a vehicle in our data. I want it to block if theres a dupe). On top of that, admins are able to see all vehicles via a second row owner. How can I do a query that will show them the duplicates?

The obvious ideal scenario would be blocking it once a customer adds a vehicle, however I’m assuming due to row owners that would not be possible hence the above.

---

<div class="post-metadata">

### Author: ![nathanaelb](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nathanaelb/32/43079_2.png) [@nathanaelb](https://community.glideapps.com/u/nathanaelb)
#### Post date: [April 14, 2024, 9:36pm UTC](https://community.glideapps.com/t/checking-for-duplicates-of-an-entity-after-adding-said-entity/72574/2 "2024-04-14T21:36:41Z")

</div>

Maybe this will help:

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

---

<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: [April 14, 2024, 11:21pm UTC](https://community.glideapps.com/t/checking-for-duplicates-of-an-entity-after-adding-said-entity/72574/3 "2024-04-14T23:21:19Z")

</div>

> [@MattGlides](#):
>
> The obvious ideal scenario would be blocking it once a customer adds a vehicle, however I’m assuming due to row owners that would not be possible hence the above.

> [@Conditional logic broken? Duplicates are being allowed when they shouldn't be](https://community.glideapps.com/t/conditional-logic-broken-duplicates-are-being-allowed-when-they-shouldnt-be/72553/3):
>
> The problem here seems to be that you’re using row owners/roles and a user can’t see all of the rows, hence their input can not be matched to all rows. That allows duplicates to happen. Also, I’m not sure why you’re setting the row owner on your Row ID column. Which one is your “role” column in user profiles settings? Nevertheless, I think you must settle for a setup of a “row owners” table for your User Profiles, and a public table for your de-duplicating purpose. Everytime a user f…

Same problem mentioned in the thread above.

---

<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: [April 15, 2024, 3:28am UTC](https://community.glideapps.com/t/checking-for-duplicates-of-an-entity-after-adding-said-entity/72574/4 "2024-04-15T03:28:50Z")

</div>

Give the attendants a common role, and make that role an owner in the vehicles table.
