> For the complete documentation index, see [llms.txt](https://docs.autommate.com/userguide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autommate.com/userguide/libraries/transform/number.md).

# 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

* <mark style="color:orange;">**Assign**</mark><mark style="color:orange;">:</mark>
  * <mark style="color:orange;">Assign a numerical value to a number type variable.</mark>
* <mark style="color:orange;">**Convert (to string)**</mark><mark style="color:orange;">:</mark>
  * <mark style="color:orange;">Transform a number into a string with specified decimal precision.</mark>
* <mark style="color:orange;">**Random Action**</mark><mark style="color:orange;">:</mark>
  * <mark style="color:orange;">Generate random numbers within defined ranges.</mark>

## Usage of the Component

### Assign

<figure><img src="/files/HpA30Aq4oW0lI6UgLzfs" alt=""><figcaption></figcaption></figure>

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

**Usage:**

1. **Value to Assign**:
   * <mark style="color:green;">Enter the numerical value to assign.</mark>
   * This field accepts direct keyboard input or variable selection.
2. **Source to be Assigned**:
   * <mark style="color:green;">Choose the variable where the assigned value will be stored.</mark>
   * <mark style="color:green;">Select from existing number type variables or create a new one.</mark>

{% hint style="danger" %}
Assignment Error: The 'number assign' action cannot exceed the maximum permitted length of 19 characters.
{% endhint %}

### Convert to string

<figure><img src="/files/IbbJ5BWcmL9CegHTTeTd" alt=""><figcaption></figcaption></figure>

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

**Usage:**

1. **Enter a Number**:
   * <mark style="color:green;">Input the number to convert to a string.</mark>
   * Enter directly or select from existing variables.
2. **Enter Number of Digits after Decimal**:
   * <mark style="color:green;">Define the number of decimal places for the output.</mark>
3. **Assign the Output to Variable**:
   * <mark style="color:green;">Choose the string variable to store the converted number.</mark>

### Random

<figure><img src="/files/Pdql2rDVBOQQKbu1o4vY" alt=""><figcaption></figcaption></figure>

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

**Usage:**

1. **Beginning of Range**:
   * <mark style="color:green;">Enter the starting value of the range.</mark>
   * **Must be a numeric value.**
2. **End of Range**:
   * <mark style="color:green;">Input the ending value of the range.</mark>
   * **Must be a numeric value.**
3. **Assign the Output to the Variable**:
   * <mark style="color:green;">Select the variable to store the generated random number.</mark>

***

## Additional Tips

### [**Use Cases**](/userguide/use-cases.md)

### [FAQ](/userguide/faq.md)
