Creating a Random Number Expression 
In the Object Manager panel, under the Detail section, choose the Assigned Objects tab.
The Assigned Objects tab page appears.
Choose Expression from the Type field and choose Create Object.
In the Object Creation dialog box that appears, enter the following data:
Name
Short Text
Text
Choose Random Number in the Type field.
In the Random Number section that appears, choose the mode.
You can either choose Number mode and return a random number between two borders, minimum and maximum or choose Probability mode to return a specified probability between two given numbers.
Choose Create & 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 Assigned Objects tab.
Assign result data object. Choose Show Result Data Object.
You can add an existing data object or create a new data object.
Select an Existing Data Object
Choose
(Graphical Access).
In the context menu, choose Select Result Data Object.
In the Object Query dialog box that appears, select the data object and choose Select.
Create a New Data Object
Choose
(Graphical Access).
In the context menu, choose Create Result Data Object.
In the Object Creation dialog box that appears, create the data object.
More information: Creating Data Objects
Save the expression.