How can I create a registration number for new users?

Hi guys! So I have a few things on my mind to do here and I need your kind help.

  1. I would like to create a registration number for new registrations on my app that counts from a default value of 1000. So when the first person registers, they’ll be 1001 and the next person will be 1002, etc. I imagine that, if at all possible, this would be the easiest to do and I would be fine with doing this.

  2. But then I would love to be able to do something based on a system that is more meaningful for my database. Like, a yy/mm/dd/#. So, in this scenario, if the app went live today, first person to register would be 2206261, as in, today is 22/06/26/ . . . and the person is registration #1.

I imagine this will be a little more tasking, but I would really like that.

  1. Please note, I don’t want to use the unique ID which is created automatically with each user (thing?) because it is too long and rather meaningless to me. But if there’s a way to shorten it and it was still unique, I guess I could be all right with that.

  2. Can someone walk me through these things, please, whichever is possible? If there are holes in my thinking, kindly also let me know.

Many advance thanks!


  1. Create a thing that will store IDs, I named it “Identity Manager”

  2. Add a field to store last ID generated, in my case is “Customer ID Generator” of type number

  3. Enable backend workflows (this will only work on paid plans)

  4. Create database trigger on User object and add two actions to it:
    4.1 increase value of Identity Manager’s ID field when User Before Change is empty (meaning that user is created)

    4.2. assign generated id to User’s ID field (whatever you chose it to be) when, again, User Before Change is empty . In my example I use numeric IDs, but you might generated it based on (current date/time :formatted as + generated ID)

Forgot to mention that you will need to initialize Identity Manager manually by creating single object of that type. This is only needed once. In all “Do a search for Identity Manager” I always take first row without any constraints.

Hi! Thanks so much for this. I’m currently not on the paid plan but of course much later when I’m closer to a ready app, I’ll switch up.

If there’s no other alternative in the free plan to get such a function working for now, then that’s in the meantime that I guess. I’ll have to return to this later.

Once more, thank you.

Another key to mention: this will generate IDs for both registered and unregistered users (those who visited your web-site but didn’t registered). If you only need IDs for registered users, then you can avoid using backend workflows and do ID generation during user registration process.

Yes, that’s what I’m trying to do: when someone clicks the register button during sign up, they get a registration number. Can I go ahead and implement it in the free plan then?

Well, I didn’t test it exactly that way, but it should work one way or another. You need to take actions from steps 4.1 and 4.2 into user registration or login workflow. In this case action conditions should be removed.

There are two alternative options:

  1. Generate and assign user ID before user sign-up, I’m pretty sure it should work, but if I’m wrong then there’s option 2
  2. Generate and assign user ID when she/he logs in for the first time (i.e. if user ID is empty).

@girl-fi It can be as simple as this:


Yes, good point, but you need to change default privacy rules for it to work correctly.
It may generate same ids for two users that are registering at the same time, though it’s probably quite rare situation in your case.

@oliviercoolen this is as far as I’ve been able to go. Do you know what I might be doing wrong, please?

Is your ID field a text field?

No. It’s a number.

@oliviercoolen I feel like I’m missing something very elementary here. When I plug the expression into a simple text box to display on the page, it works perfectly. I assume this means the database is set up correctly?


But when I try to plug the same expression into a workflow, the ‘current date/time’ bit breaks down.

It does say that it needs to be a number whereas it is a text

should be

But here is what I have in my database

Any pointers?

Well, it clearly says you need to provide number into that field. Date: formatted as, though it looks like number, is in fact a text that consists of number characters. Add :converted to number afterwards if you want it to be a number, but this approach looks strange to me… I’d make this field of type “text” instead.


@vladimir.pak, adding “:converted to number” worked out for me. And thank you for the suggestion to change the type of the field. Changing it to “text” worked out even better! Thank you so much.

@oliviercoolen, I owe you much gratitude, too. Thank you!