Forum Academy Marketplace Showcase Pricing Features

Generating Random Sting of Numbers

Hello, thank you for taking the time to read this. I was wondering if it is possible to generate a random string of numbers but making sure the numbers aren’t repeated (Like a unique ID)

Hi there, @KDenv01… you can use the Calculate formula >> Generate random string option to create the random string of numbers. Check out this video to see it in action…

As for making sure the random string is not repeated, you would have to do that through a workflow condition that searches the associated data type to get a count of strings that match the generated string, and you would only proceed with the generated string if the count is 0.

All of the above being said, you can also generate a unique (but not random) id for a thing by starting at some number for the first thing and then adding 1 to the number for each subsequent thing. If you go that route, you don’t necessarily have to worry about the id being repeated (assuming lots of those things aren’t being created at the exact-ish same time).

Hope this helps.


1 Like