# Set Variable

### Overview

The Set Variable integration allows you to store values within a Decimal workflow so they can be reused by downstream nodes. It helps manage workflow state, simplify data handling, and improve readability.

Common uses include storing API results, computed values, and control flags.

***

### Module

#### Set Variable

Assigns a value to a named variable and makes it available to subsequent workflow steps.

***

### When to Use Set Variable

Use this node when you need to:

* Store intermediate values
* Reuse data across multiple nodes
* Simplify complex data paths
* Maintain workflow state

***

### Adding Set Variable to a Workflow

1. Open the Decimal workflow editor
2. Add or connect from an existing node
3. Select Transform → Set Variable
4. Connect it to the previous step

The Set Variable Settings panel opens automatically.

***

### Configuration

#### Variable Name

Name of the variable to set.

**Example**:

*myVariable*

Required field.

***

#### Value

Value to assign to the variable.

**Example**:

*100*

Required field.

***

#### Value Type

Select the data type of the value:

* String
* Number
* Boolean
* JSON

Choosing the correct type ensures proper usage downstream.

***

### Output

The variable is stored in the workflow context and can be referenced by later nodes using its name.

***

### Example Use Case

Use Case: Store a computed value for reuse.

Workflow:

1. Trigger
2. Run Code (compute a value)
3. Set Variable (store the result)
4. Use the variable in later nodes

<br>


---

# 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://wiki.decimal.at/technical/node-directory/set-variable.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.
