rand. Math Function.(Power Automate Cloud flows)

Japanese version.

Get a random number.


rand(<minValue>, <maxValue>)
minValueRequired fieldMinimum Value.
maxValueRequired fieldMaximum value + 1

How to use

In most cases, it is used in the "Value" when "Initialize variable" or "Set variable" of type "Integer" or "Float".

Click on the "Expressions" tab, rand, and the function name and () will be set in the formula field.

Two values are specified as arguments. This is a range of random numbers.

If you want to use dynamic contents or variables, specify them specially.

(How to get dynamic content with an expression)

If you see something like the following, your settings are complete.

Click on the purple icon to change the function.

For example, rand(0,100) yields an integer between 0 and 99.

The rand function can only take integers.

If you want to get a decimal number, use the div function.

Divide the result of rand by a multiple of 10 to get a decimal number.



Math Functions