Not urgent - avoid input duplicated code (text)

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

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.

1 Like

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…

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

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.

No, I don’t see that at all.

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.

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

1 Like