# Set Variable

### Overview

The **SetVariable Component** assigns variables dynamically based on input type and value. It allows storing values in various formats such as text, numbers, dates, booleans, and files.

### Usage

#### Input Ports

| Port | Description                                              |
| ---- | -------------------------------------------------------- |
| `in` | Accepts an object containing variables and their values. |

#### Output Ports

| Port  | Description                                |
| ----- | ------------------------------------------ |
| `out` | Emits the assigned variables as an object. |

#### Supported Variable Types

* **Text** (`text`) – Stores a string value.
* **Textarea** (`textarea`) – Stores a longer text value.
* **Number** (`number`) – Stores a numeric value.
* **Date-Time** (`date-time`) – Stores a date and time.
* **Boolean** (`toggle`) – Stores a true/false value.
* **File** (`filepicker`) – Stores a selected file reference.

### Instructions

1. **Provide Variables**
   * Send an object containing variable names, types, and values to the `in` port.
2. **Processing Variables**
   * The component assigns the variables dynamically based on their types.
3. **Retrieve Output**
   * The processed variables are sent as an object through the `out` port.

### Notes

* **Flexible Variable Storage**: Supports multiple data types for dynamic variable assignments.
* **Useful for Workflow Automation**: Allows temporary storage of values for later processing.
* **Outputs in Key-Value Format**: The output is structured as an object containing assigned values.
