# Prevent duplicate Usernames

**URL:** https://community.glideapps.com/t/prevent-duplicate-usernames/15661
**Category:** Feature Requests
**Created:** [September 11, 2020, 8:26pm UTC](https://community.glideapps.com/t/prevent-duplicate-usernames/15661 "2020-09-11T20:26:06Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Deena](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deena/32/9877_2.png) [@Deena](https://community.glideapps.com/u/Deena)
#### Post date: [September 11, 2020, 8:26pm UTC](https://community.glideapps.com/t/prevent-duplicate-usernames/15661/1 "2020-09-11T20:26:06Z")

</div>

Seems that it’s a very common use case to allow user’s to create usernames (or similar). Would be great to have a way to tick a box in text component to prevent duplicate strings from being created so that the usernames are actually unique - (same as IG where you get an error that the username is not available). I understand this is probably a massive over-simplification of developing this feature. 🙃

---

<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: [September 11, 2020, 9:37pm UTC](https://community.glideapps.com/t/prevent-duplicate-usernames/15661/2 "2020-09-11T21:37:39Z")

</div>

While we wait for this to be available, a workaround would be using the sign up tab visibility we have talked about many times on here, make a relation from the input username to the username column, and don’t let the user advance when the relation is not empty,

---

<div class="post-metadata">

### Author: ![Deena](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deena/32/9877_2.png) [@Deena](https://community.glideapps.com/u/Deena)
#### Post date: [September 11, 2020, 9:42pm UTC](https://community.glideapps.com/t/prevent-duplicate-usernames/15661/3 "2020-09-11T21:42:39Z")

</div>

We can give then an error message and keep them on the username til they enter one that has not been used? and would there be a lag?

---

<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: [September 11, 2020, 9:43pm UTC](https://community.glideapps.com/t/prevent-duplicate-usernames/15661/4 "2020-09-11T21:43:34Z")

</div>

Yes that is the way to go. And no lag here, that will be instantly.

---

<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: [September 11, 2020, 9:44pm UTC](https://community.glideapps.com/t/prevent-duplicate-usernames/15661/5 "2020-09-11T21:44:57Z")

</div>

The only risk is that if you use that username for relations then there will be multiple results, because you’re actually storing that duplicated username in your data. Personally I always use email just to make sure.

---

<div class="post-metadata">

### Author: ![Deena](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/deena/32/9877_2.png) [@Deena](https://community.glideapps.com/u/Deena)
#### Post date: [September 11, 2020, 9:46pm UTC](https://community.glideapps.com/t/prevent-duplicate-usernames/15661/6 "2020-09-11T21:46:58Z")

</div>

Yeah, I would rather just wait on this one. I don’t love workarounds, especially if they create lag or get too complicated! 😁

---

<div class="post-metadata">

### Author: ![Manan\_Mehta](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manan_mehta/32/13957_2.png) [@Manan\_Mehta](https://community.glideapps.com/u/Manan_Mehta)
#### Post date: [September 12, 2020, 4:10am UTC](https://community.glideapps.com/t/prevent-duplicate-usernames/15661/7 "2020-09-12T04:10:52Z")

</div>

I do this in my apps which require unique usernames and have zero lags but surely it has a slightly longer workaround. It’s a self-relation with the username column and then a roll-up to count the number of relations. I use a simple condition using the rollup column to show the error text.
