# Array

## Introduction

The "Array" library provides functionalities to define a large number of variables of the same type and perform operations on these variables. It offers actions to manipulate arrays efficiently within the system.

The purpose of the "Array" library is to simplify array operations, such as adding new data, creating new arrays, and deleting data, making it easier for users to manage and manipulate array variables.

## What is the Array Library?

The "Array" library allows users to work with array variables, enabling them to store and manipulate collections of data efficiently.

#### Key Features

* <mark style="color:orange;">Define and manage array variables</mark>
* <mark style="color:orange;">Perform operations like adding, assigning, and deleting data within arrays</mark>

## How To Use Action

### Add

**Description:** The Add action allows users to add new data to a created array.

**Usage:**

1. **Array variable:**
   * Select an existing array variable where the data will be added.
2. **Item:**
   * Define the data to be added to the array.
     * Textual data: <mark style="color:green;">Define in quotes (e.g., "New Item").</mark>
     * Numeric data: <mark style="color:green;">Define without quotes (e.g., 123).</mark>
     * Variables: <mark style="color:green;">Specify between ## ##</mark> <mark style="color:green;"></mark><mark style="color:green;">**(e.g., ## Variable\_A ##**</mark><mark style="color:green;">).</mark>

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FDitXlXsvwvc0ph0wGCHU%2Fimage.png?alt=media&#x26;token=cc219c9a-0054-4e75-b818-53ef469303b1" alt=""><figcaption></figcaption></figure>

### Assign

**Description:** The Assign action is used to create a new array or fill an existing array variable.

**Usage:**

1. **Array variable:**
   * Select an existing array variable or create a new one.
2. **Variable:**
   * Fill the array variable with data.
     * <mark style="color:green;">Data is filled using quotation marks between the</mark> <mark style="color:green;"></mark><mark style="color:green;">**\[ ]**</mark> <mark style="color:green;"></mark><mark style="color:green;">brackets.</mark>
     * <mark style="color:green;">Variables can be added between</mark> <mark style="color:green;"></mark><mark style="color:green;">**## ##**</mark> <mark style="color:green;"></mark><mark style="color:green;">if desired.</mark>
     * <mark style="color:green;">For numeric data, do not use quotation marks.</mark>

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2F2KptOczXDzYJSCbOymZE%2Fimage.png?alt=media&#x26;token=475abd4b-7df9-4a98-b511-f44be228b98e" alt=""><figcaption></figcaption></figure>

### Delete

**Description:** The Delete action allows users to remove data from an array.

**Usage:**

1. **Array variable:**
   * Select the array variable from which data will be deleted.
2. **Filter:**
   * Choose the method of deletion:
     * <mark style="color:green;">FILTER BY INDEX: Delete data based on the index.</mark>
     * <mark style="color:green;">FILTER BY VALUE: Delete data based on the value entered.</mark>
3. **Assign the output to variable:**
   * Select the variable where the updated array will be assigned.
     * Choose from existing array variables or create a new one.

<figure><img src="https://4222414448-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMAf5diEa8kgXDA6h47Cu%2Fuploads%2FT4HCjRDTg3ixFltGUKZO%2Fimage.png?alt=media&#x26;token=a7b985f4-3208-4fd2-8588-4680cf068a0f" alt=""><figcaption></figcaption></figure>

***

## Additional Tips

### [**Use Cases**](https://docs.autommate.com/userguide/use-cases)

### [FAQ](https://docs.autommate.com/userguide/faq)
