Key gets overwritten

Hi, I have a HR data base where we enter new joiners and when we create them we assign them a unique ID (matricule) that is incremental and used as Key.  

When someone creates a new person, if the number is already used the following error message shows:

Screenshot 2023-12-01 at 16.26.18.png

However, it happened that new profiles overwrote already existing profile, a profile was created with the number 2160 (let's say named Joe) but later a different profile was created (for let's say Jane) who already had this number assigned which had as consequence to erase the previous profile with the assigned matricule.

Would you know why this happened ? And how to make sure it doesn't happen again ? 

0 3 127
3 REPLIES 3

Hey man, 

you need to use different number ranges for each app user

The reason why this happens is a normal behavior. When two users are adding a new row at the same time.. or should I say with the same data in their devices,  they both will generate the same key value. And in that situation, the last one wins. When pushing the data to your data source, it overwrites the existing row.

Top Labels in this Space