The FileMaker Pro "Random" function allows you to use random numbers in a calculation. It generates a number greater than or equal to zero, and less than one. You can use additional mathematical formulas to generate numbers or integers within a range. The "Replace" command will set a field with a sequence of random numbers that will not change in the future.
- Skill level:
- Moderately Easy
Other People Are Reading
Select the field of your database that you would like to fill with a random number sequence.
Choose "Replace Field Contents" from the "Records" menu.
Click the "Specify" button next to "Replace with calculated result."
Enter the random number calculation. Use just the word "Random" to generate a number between zero and one (zero is possible, but one is not). If you wish to generate a specific range of random numbers, use a calculation. For example, to generate a random integer between one and six, use "Int(Random * 6) + 1". "Random*6" generates a number between 0 and 5.999; "Int" rounds this down to an integer; "+ 1" shifts the range from 0 to 5, to 1 to 6. Click "OK" to replace the field contents.
Repeat these steps for each field you wish to use as a random sequence. To simulate two dice, for example, you could use two fields named "Die1" and "Die2," or you could use the single calculation "(Int(Random * 6) + 1) + (Int(Random * 6) + 1)".
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for