Unique Code generator

Hello community!

I am creating an app when the user clicks on save button, it needs to generate a specific code for each entry, eg: “BRA+sequence of number”. How can I do that?

Thanks a lot!

I do it for the referral code for my site.
By the way, 9 as I choose there is waaaay to big a number if you’re using it for referral.



BRA = Brazil? What are you building?

Thanks for the help!

Sorry for the question but where can I find “Calculate RandomString”?

BRA is Brazil! =D

I’m building a customized app in order to help my daily routine on my job.

Thanks a lot buddy!


1 Like

Sorry but I still can’t do this, I mean, when it looks still missing some information… What’s wrong?

You have to tell it a length of characters. Just type in a number.

I set 5 but it’s not creating this info. This needs to be stored in a data base and showed in a repeating group… but it shows exactely the number I put…

What type of field is ID Cartão?

Where I use it in my application, it is a simple text field.

1 Like

I just set type of field = text and it’s working but actually I need to generate the code as specific text + sequencial number, e.g. BRA-001, BRA-002…

Is it possible?

That’s a bit different. Would this solve it?

Peek under the hood:

1 Like

This is exactly what I need, So, what parameters should I use? Could you please show me some pictures?

Thanks a lot!!!

Hi rico,

I’d like to do this as well but your editor link does not work for me - what is the workflow for the Generate Code button to get the consistent BRA text and specific sequential numbers? I guess you don’t use Random String anymore?



** just realized I had a draft that never got sent. I will post it but I think the screen shots got lost **

Link to the editor.

If you click that 2nd link and go into the workflow tab, you can see all the details. (The app is marked as public - hopefully no one will go in there and mess it up)


I did a dirty little job there that might do all that you need. But in summary is this:

  • create a Thing that is a counter; set it at 1
  • whenever he clicks the button it will create a card with BRA-00x format.
    – if the counter is <10 then it should be BRA-00x (where “x” is the number from the counter)
    – if the counter is > 9 and < 100, it will be BRA-0xx
    – if the counter is >99, then it will be BRA-xxx
  • at the end of the workflow, increase the counter with +1




1 Like

That’s great thanks. I don’t get what the :formatted as 1029 is doing - is the 1029 text you’ve just typed in?

BTW there is a public forum app to copy and paste stuff if you don’t want to use your own editor. It’s here:

This topic was automatically closed after 70 days. New replies are no longer allowed.