Random
Purpose 
Returns a number between zero and one, including zero, but not including one.
Format 
Random
Parameters 
None
Data type returned 
number
Originated in 
FileMaker Pro 6.0 or earlier
Description 
Returns a pseudo-random number in the range (0,1). FileMaker Pro generates a new random number when you:
 •
insert the Random function into a formula
 •
cause a formula containing the Random function to be reevaluated (by changing data in any of the fields the formula uses)
 •
Examples 
Int ( Dice::NumSides * Random ) + 1 returns a randomly chosen side of a single die.
The following script calculates multiple die rolls, adds the rolls to a single variable, then displays the results in a custom dialog.
Loop
Set Variable [$ROLL; Value:$ROLL + ( Int ( Test::NumSides * Random ) + 1 )]
Set Variable [$COUNTER; Value:$COUNTER + 1]
Exit Loop If [$COUNTER = Dice::NumDice]
End Loop
Show Custom Dialog [$ROLL]
Related topics 
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas