Forum Academy Marketplace Showcase Pricing Features

How unique are the unique ids in Bubble?

I am planning to do a redirect page that looks at multiple tables in my database and searches by id for all of them. If it finds it, it redirects to that item’s page.

I am doing this so I can create a link like this:
myapp.com/redirect/123456x123456
and it goes to for example:
myapp.com/project/123456x123456

So that’s why I’m asking the question: are the unique ids unique to their table or throughout the whole database of my app?

Because my plan wouldn’t work if the id’s are unique to only the table and there is a chance for them to be duplicated across the database.

They will always be unique, either by a timestamp element or by a unique lookup. For security reasons, you should never expose your databases unique IDs, but should generate your a public version. This can be done by using the calculate formula, unique string function, and it should do a search for strings to make sure count < 1

Hey @nfish -

Can you clarify how you would go about generating a random string that won’t be duplicated? I have been trying to set this up for a little bit now and can’t quite get it to work.

List Shifter has such a feature. The only external library it loads is nanoid, which can create URL-friendly unique IDs of any length.

Find it as an operator in the Process List action.

4 Likes