# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autommate.com/userguide/libraries/transform/number.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
