# Not urgent - avoid input duplicated code (text)

**URL:** <https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372>\
**Category:** Ask for Help\
**Created:** [April 10, 2021, 4:58am UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372 "2021-04-10T04:58:11Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)\
**Post date:** [April 10, 2021, 4:58am UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372/1 "2021-04-10T04:58:11Z")

</div>

Here in Brazil, we have a standard doc like bank slip with a code bar and 48 digits, like a hash to pay the bills.  
In my app, people input these 48 digits. I realized that people are adding twice, three times the bill.  
How do u suggest avoiding this, to check this code before saving in order to avoid duplicated code?

Is there a way, to notify the user that the code that he´s input already exists?  
Thx in advance

---

<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 10, 2021, 5:22am UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372/2 "2021-04-10T05:22:56Z")

</div>

The concept app available below demonstrates how to prevent duplicate submissions. You can copy it and study it. The key to it is the `rel-dup` relation column in the “Animals” table.

> [@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:** ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)\
**Post date:** [April 11, 2021, 4:36am UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372/3 "2021-04-11T04:36:12Z")

</div>

With all due respect , because I don´t have your experience, I studied your app and implemented in my app, but did u noticed that even if the name is new, the hint error shows up? Even if setting columns with clear values the error appears.

I’m trying to understanding…

---

<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 11, 2021, 5:22am UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372/4 "2021-04-11T05:22:59Z")

</div>

If that’s happening, then something must be wrong with the setup. Can you show me how yours is configured?

---

<div class="post-metadata">

**Author:** ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)\
**Post date:** [April 11, 2021, 5:38am UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372/5 "2021-04-11T05:38:37Z")

</div>

In the app u shared is happen as well. I went to the easiset way, deleted the hint. If the code is duplicated the save button is working very very well.

What´s happing…try to add a new animal in your app, a new one. the hint error shows rapidly.

---

<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 11, 2021, 5:41am UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372/6 "2021-04-11T05:41:23Z")

</div>

> [@Alexandre\_Caruso](#):
>
> What´s happing…try to add a new animal in your app, a new one. the hint error shows rapidly.

No, I don’t see that at all.

---

<div class="post-metadata">

**Author:** ![Alexandre\_Caruso](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/alexandre_caruso/32/6240_2.png) [@Alexandre\_Caruso](https://community.glideapps.com/u/Alexandre_Caruso)\
**Post date:** [April 11, 2021, 5:50am UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372/7 "2021-04-11T05:50:45Z")

</div>

Really? I didn´t change anything in your app. Maybe I’m gonna try to get again.  
But let me try to write in another way, please look over my English mistakes.

When u gonna add a new animal, pay close attention on the position of hint error. It´s appear quickly but the new animal is saved.

In the other hand, when u add a animal that already exists, the hint shows up and stop and u can´t save. Check it out.

Pls dont get me wrong.

---

<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 11, 2021, 6:15am UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372/8 "2021-04-11T06:15:05Z")

</div>

> [@Alexandre\_Caruso](#):
>
> When u gonna add a new animal, pay close attention on the position of hint error. It´s appear quickly but the new animal is saved.

ah yes, now I see.  
That’s caused by a race condition when the animal is saved.  
What happens is that when the new row is added, the `rel-dup` relation is no longer empty, and so the visibility condition stops taking effect. It doesn’t affect the functionality in any way.

I just added an extra visibility condition on that component, which should (I think) stop that behaviour.

![Screen Shot 2021-04-11 at 2.13.05 PM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/f/4fdd00f7691737b561538ac2d9d9dbb86a5a8715.png)

---

<div class="post-metadata">

**Author:** ![NoCodeAndy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nocodeandy/32/62530_2.png) [@NoCodeAndy](https://community.glideapps.com/u/NoCodeAndy)\
**Post date:** [January 17, 2024, 4:52pm UTC](https://community.glideapps.com/t/not-urgent-avoid-input-duplicated-code-text/25372/9 "2024-01-17T16:52:41Z")

</div>


