How to create a unique ID which is an auto-increment value instead of a random string of letters?

I’m wondering how I would approach creating a unique ID for each user created record that will be inserted into the database. I know that Bubble provides an in-built random generated string capability as part of the ‘Calculate a formula’, but it appears that it will just keep creating a random string. What I’d like instead is to be able to define a format, such that a unique ID is generated but also that it is an auto-incremented value as opposed to a random string each time a record is created. So I’d like to define a format for e.g. something like AA-1000 such that each time a new record needs to be created, it will generate an ID like AA-1001, AA-1002, AA-1003, etc.

Any guidance on how I would approach this, preferably, without using a plugin, would be much appreciated.

Thank you.


@SeanB Welcome to the community!

1 Like