Hi, I have messaged on this a few times now, just reaching out to see if either something has been released by Glide or if anyone else has found an easy way to this without having to use an API as that is my next solution.
I need to create unique ID (counters) for when we create projects, events, users, employees, companies, etc… We tried using the rolloup (MAX) and match (NEXT) logic, however, when we have multiple users (most cases) you get into a race condition, where if multiple people open up the form they will all receive the same ID and we end up with duplicates. Especially bad when we are trying to generate PO and invoice numbers
What we then did was to add a counter in the users profile, and increment that at time of submit, worked fine, or so we thought, over the periods of about 3 months of usage, we came across a duplicate, when we investigated further we found another 700 duplicates out of 13,000 invoices generated. The issue is that these invoices were never billed/sent to the clients for payment, we now have a lot of explaining to do with our own client.
Not sure what happened here, if it was that the same user opened up multiple windows (laptop, desktop, tablet, phone, etc…) or there was some other glitch, but its a major issue.
I am sure others are also doing invoices and have to create unique invoice numbers, how are you doing it. It needs to be an atomic operation of giving you an ID and incrementing immediately, I am surprised that it has not been implemented yet.
My next solution is to create an API for unique counter, where I start a new counter and I am returned a countername and the counter, and after that each time I want a unique ID I just make a call with the countername, it gives me the next number and increments the counter to ensure it never gives out the same value more then once. Just seem a bit of an overkill for something basic/core.
Any ideas ?