Salesforce

RAND (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

RAND (Magic xpa 3.x)

Generates random numbers.

Syntax:

RAND(startnumber)

Parameters:

startnumber: A seed number used to define the sequence.

Returns:

A random decimal number between 0 and 1, such as .3234

Example:

If startnumber=-1, the seed is initialized randomly.

If startnumber=n (where n is not 0 or -1), the seed is initialized to n.

If startnumber=0, the next random number is generated based on the existing seed.

After initializing the seed, continue with RAND (0) to generate each random number.

See also:

The Online and Rich Client Samples projects (program NM07 and RNM07)

Reference
Attachment 
Attachment