Generate random combination of letters and numbers fith fixed length

This is possible, if for example you recently added the field, or manually edited the “999” it wouldn’t have given the UI’s cached database values a reason to update.

Incrementing the max ID is a vulnerable method; when two users are created at roughly the same time they might return the same max ID, and caching makes the window of error even larger.

Note that each row already has a unique ID, that looks like:
1477501458054x757140743779018500

I take it you want something useful for people to read though!

Ideally it would be possible to use a database sequence, or PostgreSQL’s serial number type, to guarantee a unique number, perhaps the Bubble developers can make it available?

Edit: there is a workaround posted here, still allows collisions but less likely than if sequential:

Edit again: Could use Bubble’s random number generator function instead of calling the API.

1 Like