Quick Question: How do I avoid ID duplicates when adding records to a database?

As Mike says, you don’t need to do this as all Things already have a unique ID. Every “Equipment Sub Category” is a unique object, even if all of their fields are the same.

Occasionally, someone here insists that they need to give some sort of thing a unique, asymptotically increasing serial number for some (non-technical) reason.

It turns out that Bubble can do this, but it’s tricky and the thread linked below is the definitive word on how to accomplish that. Start with this post, which summarizes the solution:

The whole thread is quite interesting though if you’re very nerdly about Bubble and there’s a classic @keith video in there, to boot.

BUT let me stress that there’s literally no reason to give your Equipment Sub Category object an “id” number. If you want to know what order your Equipment Sub Categorys were created in, just Search for them and sort them by created date.

(Which of course implies that one could— were one really insistent on this—just run those Things sorted in that order through a workflow and later give them numbers like this, but again I fail to see why this is desirable.)

3 Likes