How to create random numbers?

2
I want to create random number and check them in the database if it is available in DB then once again i have to generate a new random number until i have a number that is not in the database. The random number should be within specified limit. Please help
asked
2 answers
17

Using random() in a microflow creates a random number between 0 and 1. You can then multiply this number to fit it to your specified limit.

answered
8

The solution of Robbert was perfect. 


I’ve created a integer/long variable and used: round(random() *10) 

This gets you a random integer. 

 

 

answered