Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Number

Introduction

The Number library in Automate provides actions that facilitate operations related to numerical data within the automation process.

The purpose of the Number library is to offer functionalities to assign, convert, and generate random numbers efficiently.

What is Number?

The Number component allows users to manipulate numerical data seamlessly. It includes actions such as assigning values, converting numbers to strings, and generating random numbers within specified ranges.

Key Features

  • Assign:

    • Assign a numerical value to a number type variable.

  • Convert (to string):

    • Transform a number into a string with specified decimal precision.

  • Random Action:

    • Generate random numbers within defined ranges.

Usage of the Component

Assign

Earlier UI reference: Number Assign. Check field labels against the installed library version.
Earlier UI reference: Number Assign. Check field labels against the installed library version.

Description: The Assign action sets a numerical value to a number type variable.

Usage:

  1. Value to Assign:

    • Enter the numerical value to assign.

    • This field accepts direct keyboard input or variable selection.

  2. Source to be Assigned:

    • Choose the variable where the assigned value will be stored.

    • Select from existing number type variables or create a new one.

Convert to string

Earlier UI reference: Number Convert to string. Check field labels against the installed library version.
Earlier UI reference: Number Convert to string. Check field labels against the installed library version.

Description: The Convert (to string) action changes a number to a string format with specified decimal precision.

Usage:

  1. Enter a Number:

    • Input the number to convert to a string.

    • Enter directly or select from existing variables.

  2. Enter Number of Digits after Decimal:

    • Define the number of decimal places for the output.

  3. Assign the Output to Variable:

    • Choose the string variable to store the converted number.

Random

Earlier UI reference: Number Random. Check field labels against the installed library version.
Earlier UI reference: Number Random. Check field labels against the installed library version.

Description: The Random Action generates a random number within a specified range.

Usage:

  1. Beginning of Range:

    • Enter the starting value of the range.

    • Must be a numeric value.

  2. End of Range:

    • Input the ending value of the range.

    • Must be a numeric value.

  3. Assign the Output to the Variable:

    • Select the variable to store the generated random number.


Additional Tips

Use Cases

FAQ

Worked example: keep a number separate from its display text

Use Number → Assign and Convert to string to distinguish numeric data from formatted output.

1. Create a Number variable named effort_hours. In Number → Assign, enter 12.5 in Value to Assign and select effort_hours as Source to be Assigned.

2. Add Number → Convert to string. Select effort_hours in Enter a Number, enter 2 in Number of Digits after Decimal and assign the output to a String variable named effort_label.

3. Run once and inspect both types and values. Expect effort_hours to remain the number 12.5; effort_label is text representing that number with the configured precision.

4. Check the actual decimal separator and trailing-zero behavior returned by your installation before using the display text in an external contract. Do not feed localized display text back into arithmetic without conversion.

Was this helpful?