Creating a Random Number Expression 
Open the application in the Object Manager panel.
Under the Detail section, choose the Contained Objects tab.
The Contained Objects tab page appears.
Choose Expression from the Type field and choose Create Object.
In the Object Creation dialog box that appears, choose Random Number in the Type field.
Enter the following data:
Name
(Optional) Short Text
(Optional) Text
In the Random Number section that appears, choose the mode.
You can either choose Number or Probability mode.
In the number mode, a random number within a specified range is returned.
In the probability mode, the expression returns a Boolean true value, if the specified probability between 0 and 1 is met.
Select Number Mode
Choose Number from the Mode field.
Enter values in the Minimum and Maximum fields.
Select Probability Mode
Choose Probability from the Mode field.
Enter value between 0 and 1 in the Probability field.
Choose Create and navigate to object.
The random number expression appears in the Object Manager panel.
Note
If you choose Create, the random number expression appears under the Contained Objects tab.
Choose Show Result Data Object.
A default data object is set automatically depending on the mode selected.
For number mode, a data object of type number is set whereas a data object of type Boolean is set for probability mode.
You can also assign a standard type, an existing data object or create a new data object as the result data object.
Select a Standard Type
Choose
(Graphical Access).
In the context menu, choose Default Objects and choose the data object type.
Note
There are two standard types, number and boolean, which are available depending on the mode you choose.
Select an Existing Data Object
Choose
(Graphical Access).
In the context menu, choose Select....
In the Object Query dialog box that appears, select the data object.
Create a New Data Object
Choose
(Graphical Access).
In the context menu, choose Create....
In the Object Creation dialog box that appears, create the data object.
For more information, see Creating Data Objects
(Optional) You can also use expressions as values for the modes.
Choose the Switch to Referencing Mode button.
The values present in the value field will be discarded when you switch to referencing mode.
The
(Graphical Access) icon replaces the value field.
Select an existing expression or create a new expression.
Select Other Context Parameters
Choose
(Graphical Access).
In the context menu, choose Other Context Parameters....
In the Context Query dialog box that appears, select the data object.
Select an Existing Expression
Choose
(Graphical Access).
In the context menu, choose Expressions....
In the Object Query dialog box that appears, select the expression.
Create an Expression
Choose
(Graphical Access).
In the context menu, choose Create Expression....
In the Object Creation dialog box that appears, create the expression.
For more information, see Creating Expressions
Activate the expression.
Save the expression.