# Anyway to make sure a relation field does not scan itself?

**URL:** https://community.glideapps.com/t/anyway-to-make-sure-a-relation-field-does-not-scan-itself/78550
**Category:** Ask for Help
**Created:** [December 12, 2024, 12:41pm UTC](https://community.glideapps.com/t/anyway-to-make-sure-a-relation-field-does-not-scan-itself/78550 "2024-12-12T12:41:51Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Darbi\_Moore](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darbi_moore/32/83033_2.png) [@Darbi\_Moore](https://community.glideapps.com/u/Darbi_Moore)
#### Post date: [December 12, 2024, 12:41pm UTC](https://community.glideapps.com/t/anyway-to-make-sure-a-relation-field-does-not-scan-itself/78550/1 "2024-12-12T12:41:51Z")

</div>

Hello. I am trying to create a username checker that will make sure 2 users cant have the same “username” (text column). I though of just using a relation column to check all "username"s in users, than a if, then column to say ‘taken’ if the realtion column was NOT empty and to say ‘unique’ if empty. This worked, until a user ented a username. The relation scanned all "username"s in the username column and found that same user, so the if, then comand said ‘taken’  
For eg, ‘Greg’ makes his username ‘gregtheguy’ but the if, than command said it was taken as the relation scanned ofr usernames and found ‘Greg’ with the same username ‘gregtheguy’ even though he is the SAME PERSON!!! 🤯  
Please could anyone let me know how i could do something bout this like “fitering” the relation column for the not the same user of something…

---

<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 12, 2024, 12:52pm UTC](https://community.glideapps.com/t/anyway-to-make-sure-a-relation-field-does-not-scan-itself/78550/2 "2024-12-12T12:52:27Z")

</div>

Make it a multiple relation, and then use a rollup to get a count. If the count is greater than one, then you have a duplicate.

---

<div class="post-metadata">

### Author: ![Darbi\_Moore](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darbi_moore/32/83033_2.png) [@Darbi\_Moore](https://community.glideapps.com/u/Darbi_Moore)
#### Post date: [December 13, 2024, 4:45am UTC](https://community.glideapps.com/t/anyway-to-make-sure-a-relation-field-does-not-scan-itself/78550/3 "2024-12-13T04:45:20Z")

</div>

yes, while this does work, what i was doing is i had a text component that would display if rollup is more that 1, that says “this username is taken” when someone trys a taken one on the edit profile screen. but the problem now is that it deosnt update live, so if Greg had the username “Hello” and then Bob comes along and edits profile and trys to enter the username “Hello” as well IT SHOULD say “this username is taken” but it says nothing. than when bob comes back it will show the “this username is taken” text. is there anyway else to hold the user from submiting edit profile chnage until their username is unique?

---

<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 13, 2024, 9:12am UTC](https://community.glideapps.com/t/anyway-to-make-sure-a-relation-field-does-not-scan-itself/78550/4 "2024-12-13T09:12:59Z")

</div>

To do that you need to use a custom form.

---

<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 14, 2024, 8:22am UTC](https://community.glideapps.com/t/anyway-to-make-sure-a-relation-field-does-not-scan-itself/78550/5 "2024-12-14T08:22:26Z")

</div>

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