Function: RandEx


Returns a record's random number in the range 0-4294967295. This is an expanded version of the Rand function, which only returns numbers in the range 0-32767.





Return value

This function returns a number in the range of 0-4294967295.

Calculated field example

To generate a field filled with random numbers, use the following calculated field expression:


This application of the RandEx() function has application in certain areas, such as auditing (see Filter example, below).

Filter/Find example

Certain tasks, such as auditing, require that you generate a random subset of the table database. This can be done in Monarch Classic using the RandEx() function. A random group of records can be selected using the filter expression:


You may use any numeric range in the set of numbers from 0-4294967295 to select a random group of records. You should be aware, however, that with this use of the RandEx function, the number of records returned is variable. If none of the randomly generated numbers happen to fall within the range you specify, Monarch Classic will return a blank table database.




© 2024 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support