Skip to main content
System
Random Float
float
code reference

Definition

The random float transformer generates a random floating point number.

For example: 32.2432

By default, the random float transformer generates a floating point number with 2 digits before the decimal point and 3 digits after the decimal point.

Configurations

Depending on your validations, you may want to configure the output float. The random float transformer has the following configurations:

NameDescriptionDefaultExample InputExample Output
Preserve LengthPreserves the length of the input float to the output float while maintaining the placement of the decimal.false1.34873.923
Digits before DecimalSpecifies how many digits you want before the decimal place. This has a max of 9 digits. 223.2494.17
Digits after DecimalSpecifies how many digits you want after the decimal place. This has a max of 9 digits. 387923.434.8

Examples

There are several ways you can mix-and-match configurations to get different potential random float formats. Here are some possible combinations:

PreserveLengthDigits before DecimalDigits after DecimalExample InputExample Output
falseN/AN/A89.23223.824
true412.3449.813
true23678.2354.129