RandomInteger ( start ; stop )
Generates a signed random integer value.
Average rating: 4.4 (31 votes) Log in to vote
Kalle Samuelsson Premium System http://www.premium.se |
RandomInteger ( -5; -1 )
RandomInteger ( -5; 5 )
-2
0
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function generates a random signed interger value (or acctually as big a number as FMP allows it to be) streching across zero if a negative start-param and positiv stop-param is givven.
The value returned will be inside or equal to the start and stop params sent to the function. The stop-param must always be larger then the start param!
I commonly use this function as an addition to script step "GoToRecord[ NumberByCalculation ]" wich make a easy way of selecting a random record. The function call would the look like this:
RandomInteger( 1 ; get(foundcount) )
Simple but effective, enjoy!
Comments
Eli, California Sep 28, 2016 |
||
Excellent! Thank you very much | ||
Magnus, Göteborg Apr 5, 2017 |
||
Just what I needed. Thanks mate! | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.