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


---

# 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.appmixer.com/connector-configuration/utils/controls/setvariable.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.
