Generate random numbers
Power Automate Desktop offers a wealth of action to get data from web pages and on -premises software.
If you search for action, you can often do what you want to do with drag and drop.
This time, I will specify the maximum and minimum value, and explain how to generate random numbers each time.
It is also possible to define multiple values as arrays at the same time.
When creating only one random value
Implemented with copy and paste
Copy the following code and paste it on the edit screen of Power Automate Desktop to add the target action.
Variables.GenerateRandomNumber.RandomNumber MinimumValue: 0 MaximumValue: 100 RandomNumber=> RandomNumber
Operate and implement Power Automate Desktop
Enter "Random number generation" from "Action Search".
If you set the upper and lower limit of the random values you want to create, you will generate random numbers each time you run.
When creating multiple random numbers as an array at the same time
Implemented with copy and paste
Copy the following code and paste it on the edit screen of Power Automate Desktop to add the target action.
Variables.GenerateRandomNumber.ListOfRandomNumbers MinimumValue: 0 MaximumValue: 100 NumbersCount: 10 AllowDuplicates: False RandomNumbers=> RandomNumbers
Operate and implement Power Automate Desktop
- Enter "Random number" from "Action Search".
- If you check "generate multiple numbers", you can set the number to be created at the same time.
- As in the case of one case, if you set the upper and lower limit of the random values you want to create, a random value will be generated each time you execute.