RAND
Use the RAND function to return an evenly distributed random real number greater than or equal to 0 and less than 1.
Use
RAND( )
Returns a random number between 0 and 1.
| Returns | Number |
Examples
Generating a Random Reference Number
You can use RAND within a Variable Update formula to generate a random numeric code for an approval run. By combining RAND with the INT function—which rounds a number down to the nearest whole number—you can create a multi-digit integer. For instance, the formula INT(RAND() * 10000) would generate a random whole number between 0 and 9,999, which could be stored in a Variable to act as a temporary security pin for a sensitive review step.
Probability-Based Path Routing
You can use the RAND function in a Path Condition formula to implement a random audit process. For example, if you want to route only 5% of completed requests to an additional "Compliance Spot-Check" activity, you could set the path condition to RAND() < 0.05. Since the function returns a value between 0 and 1, this condition will evaluate to TRUE approximately 5% of the time, ensuring a random distribution of audits without requiring manual selection.
Pro Tip: To ensure the robustness and reliability of your data, remember that RAND produces a Number data type. If you need to display this random number as a label or text string on a form, you must use the TEXT function to convert it first.