Friday
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.
Friday
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.
Friday
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.
Friday - last edited Friday
thanks... was hoping a formula so I wouldn't have to use a task but if this is the only way.