Generate‎ Number

The Generate number building block generates whole or decimal numbers within a minimum and maximum range, and it can optionally generate only odd or even values.

See the Drive data with Excel lesson for examples on how to use the Generate number block.

Fully expanded, the Generate number block shows the following properties:

image-20260207-103113.png

Note: The screenshot on this page uses the Elegance Design, introduced in 2025.3. If you are using an earlier version, your layout may look different.

Quick-start

  1. Drag Generate number onto the canvas.

  2. Connect the block in the flow and specify the basic parameters required for this block to operate: Minimum, Maximum. Optionally, you can adjust other parameters if needed.

  3. Run the flow when it’s ready.

Building block parameters

Parameters
  • Block header: The green input connector triggers the block to start executing and generate one new number value. The green output connector triggers when the number has been generated. You can rename the block title (“Generate number”) by double-clicking it and typing a new title.

  • Minimum: The minimum (inclusive) number to generate.

  • Maximum: The maximum (inclusive) number to generate.

  • Result value: The generated number value.

  • Type: Selects whether to generate even numbers, odd numbers, or both.

  • Decimals: Sets how many decimal digits the random value is rounded to. The default is 0, which means generated values are integers.

Resources

Topic

Description

Flows FAQ

Common questions about creating, running, and managing flows in Leapwork.

Flows Troubleshooting

Guidelines and solutions for identifying and fixing issues that occur when building or running flows in Leapwork.