a month ago
is there a way to create a random number?
I have a very rare use case that will require me to append something to an end of a number to make it unique.
rather than creating a variable and looping through it adding 1 (eating up tasks)
was wondering if there was some trick to just add a random number to my field to ensure its unique in this one off scenarios
Solved! Go to Solution.
a month ago
It's kinda silly, but "rand" isn't supported as a formula method. It works in a Ruby action though.
Make a Ruby action, add an output field called "random_number", and use this as the code:
{random_number: rand(100)}
This will generate a random number between 0 and 99. You can update "100" to increase the range. If you want the range to start at 10000 for example, just add 10000 to the result.
a month ago
It's kinda silly, but "rand" isn't supported as a formula method. It works in a Ruby action though.
Make a Ruby action, add an output field called "random_number", and use this as the code:
{random_number: rand(100)}
This will generate a random number between 0 and 99. You can update "100" to increase the range. If you want the range to start at 10000 for example, just add 10000 to the result.
a month ago - last edited a month ago
thanks... was hoping a formula so I wouldn't have to use a task but if this is the only way.