Hello Comunity
It’s there a way to prevent a user from adding an item with a Serial Number that already exists in another row?
The idea is when adding a new item to an existing list, in a specified column, verified it that number or text or serial number already exists and show an Information that “It already exists, please edit that one”
Are you essentially looking at avoiding duplicates for various fields? If so , then please look at the following article under section " Preventing Duplicate Field Values"
Hi @Suvrutt_Gurjar. I’m only looking to avoid duplicates in a specified Column.
Hi @Aleksi. I have 8 users using the App at the same time, but im using a unike id per row, created by Appsheet to prevent this at 100%
It doesn’t matter if you want to avoid either duplicate record or duplicate value in a specific list, situation is the same because the data will be the same for both users.
You can only avoid duplicates against the existing records in the table already. You cannot avoid duplicates when multiple users are trying the create records at the same time as they haven’t synced their data in the back-end yet.
Yes, but cant understand. I Have a column named SERIAL NUMBER.
I have to go to de DATA VALIDITY, and in the filed VALID IF and insert [_THISROW].[CustomerId]?
Should be like this then:
NOT(IN([_THIS], SELECT(inventory[SERIAL NUMBER], NOT(IN([UNIKE KEY], LIST([_THISROW].[UNIKE KEY])))))),
but its returning this error
This statement is false:
…(The value of column ‘SERIAL NUMBER’) is one of the values in the list (The list of values of column ‘SERIAL NUMBER’
…from rows of table ‘INVENTORY’
…where this condition is true: (This statement is false:
…(The value of column ‘UNIKE KEY’) is one of the values in the list (LIST(
…The value of ‘UNIKE KEY’ from the row referenced by ‘UNIKE KEY’))))
Sounds like the app editor has evaluated that expression and it is Ok. The expression will evaluate to false or true.
Do you see the tick mark in green circle in expression evaluation, then in general your expression at least syntactically is OK.
Just want to be sure you have understood this correctly. The formula Suvrutt proposed, will work in generally. But if two users are opening the form at the same time, the validation will give the same result TRUE if that number is not in the list. They can save the record and then you will have the same number twice. If this is critical in your app, you should think what other possibilities you could have.
The reason is quite simple… both users have the same data in their device when opening the form view.
You are very right @Aleksi. After your and @LeventK 's guidance on practical limitations of use of formula in multi user environment, @Marcos mentioned that “it make sense”. So I presume @Marcos has understood the limitations and continued the thread. You are right in reiterating the limitations, as impact can be substantial.
Hi @Marcos, please use the formula keeping limitations in mind as mentioned by senior community colleagues @Aleksi and @LeventK.
Hi @Aleksi, I absolutely understand. Your judgement and guidance has always been invaluable in the community as we have experienced it innumerable times.
I understand perfectly your concerns that make perfect sense, but I don’t think that I’m going to have that Kind of problems in the future.
There’s no way of 2 different persons add the same serial number at the same time in the App.
Thank you so much for your attention to detail and feedback Guys
I’m amazed for the way this community “spreads” knowledge!