The function ecm:random returns a random positive integer between two integers. The result can include the values used to define the upper and lower ranges. The value returned is an integer data type.

Structure​

ecm:random(integer, integer)

Parameters​

Parameter

Description

integer

Specifies the lower range of the result.

integer

Specifies the upper range of the result.

Hint:

If either parameter is entered as a negative integer or the lower range value is greater than the upper range, the function returns a value of -1

Example

${ecm:random(3, 6)} returns a single integer value from 3 to 6, for example, 5.