Getting Duplicate Unique IDs with NextSequenceValue

211
3
03-29-2024 08:26 AM
JennaWalz3
New Contributor III

I have created an attribute rule that creates a Unique ID based on the next number in the sql database sequence. When a public user submits an entry through Survey 123 it will create this Unique ID. I have noticed that sometimes two entries will have duplicate Unique IDs. I thought it could be a time delay issue but the creation date/time is a few hours apart. Any ideas?

0 Kudos
3 Replies
HusseinNasser2
Esri Contributor

This should not be possible , as NextSequenceValue simply queries the database for the next sequence (using .nextval) and databases often handle that really well. 

It could be that the app is overwriting the value somehow via an update. Check the creation user/last updated for the duplicate unique id which one is newer is probably the duplicate, also to be safe make the field uneditable. 

If you are using branch versioning or archiving you can use the history to investigate how the unique id happened to be. 

Do you know what is the database? 

 

0 Kudos
JennaWalz3
New Contributor III

It is an SQL database, and we are using branch versioning. 

0 Kudos
JennaWalz3
New Contributor III

JennaWalz3_0-1712063241314.png

 

0 Kudos