Generate a random number and assign the value to a variable. The name of the variable and the minimum and maximum possible values of the random number can be specified.
The action is used to generated random values. The random value is generated as a number. The minimum and maximum possible values can be specified. These limits are included, e.g. the generated number can equal the value of these limits. The number is assigned to a variable as a numeric value. This variable can be used in other variables, also text variables, for instance to create a random user id number as described below:
Generate variable %ID% as a random number in the range 0,...,99.
Specify variable %UserID% as text value: User%ID%. See Script Action: Set Variable on how to do this.
Now if number 47 is generated (%ID%=47) the resulting variable equals User47 (%UserID%=User47)
|
Property Name |
Description |
Typical setting |
|
Variable name |
The name of the variable that stores the generated random number. |
|
|
Minimum value |
The minimum possible value of the generated number. |
0 |
|
Maximum value |
The maximum possible value of the generated number. |
999 |
More information:
Principle of operation
Project operations - Input data
Project operations - Manage script actions
Project operations - Variables
Script Action: Set Variable
Help on help