# Variable management

{% hint style="info" %}
**Good to know:** Variable management is the same for layer and global variables alike.
{% endhint %}

## Create Variable

You can create a variable by clicking on the **+** icon of the *Custom* variable group. Once you choose what information you would like your variable to hold by clicking on the correct menu entry, the variable will appear under the *Custom* variable group.

<div align="left"><figure><img src="/files/lC48HbscAKurBUz54pPI" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Good to know**: You can also create different variable groups by clicking on the **Add group** button at the bottom of the *Layer variables* or *Global variables* collapsible.
{% endhint %}

## Rearrange Variables

You can change the order of a variable within its Variable group by clicking on its icon and **dragging** it to the spot you want to place it.

<div align="left"><figure><img src="/files/RkmNVNbiOQVxtTGqvgLC" alt=""><figcaption></figcaption></figure></div>

You can also move a variable to another Variable group by **dragging** from its icon to the collapsible icon of the wanted *Variable* group.

<div align="left"><figure><img src="/files/IUnFottcyRhFAck7xAbF" alt=""><figcaption></figcaption></figure></div>

## Delete Variable

You can delete a Variable by clicking on its **Trash icon** or by right-clicking on the **Variable icon** and selecting **Delete**.

<div align="left"><figure><img src="/files/NzXyFTag0AOZtLDEU8LO" alt=""><figcaption></figcaption></figure></div>

## Adjusting Numeric Variables

Every numeric Variable has a setting to limit the minimum and maximum values. You can change it by left-clicking on the property and selecting **Min and max** setting. Similarly, the **drag rate** can be adjusted by left-clicking on the dropdown menu.

<div align="left"><figure><img src="/files/VnpRoHzsQRsUPaiZG1hd" alt=""><figcaption></figcaption></figure></div>

With some variables, you can toggle between appearances. You can do that by right-clicking on the Variable icon and selecting the appearance dropdown menu. You can change the Integer Variable to show *As Integer* or *As Dropdown*. This is useful for uniquely naming each integer. Likewise, Float Variables that are used for time and duration, have a similar dropdown menu and can appear *As Time* or *As Float.*

## Using Variables in Layouts

Drag a Variable on the layout either by dragging and holding shift or ctrl which skips the popup menu, or by dragging and dropping, which brings up a menu where you can select either a **Getter** or a **Setter** node.

<div align="left"><img src="/files/jZUibQ1i5ZYXWxmst9jl" alt=""></div>

### Getter and Setter Nodes

<div align="left"><img src="/files/bSounx8SHoPg27o4dNZW" alt=""></div>

* **Getter** node is used to **get** the current value of a variable
* **Setter** node is used to **set** the current value of a variable

## Reference Node Replacement

In LightAct, you have the option to substitute the Getter or Setter node of a specific variable with the Getter or Setter node of another variable.

To do this, drag from the **Variable icon** of the desired variable to the *Reference node* you want to substitute.

<div align="left"><figure><img src="/files/JWGys0pgxgDcKpBTmDkJ" alt=""><figcaption></figcaption></figure></div>

{% hint style="info" %}
**Good to know:** This can be extremely useful when you copy Reference nodes of Layer variables to other layers in the project.
{% endhint %}


---

# 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.lightact.com/layers-and-layouts/layer-layouts/variables/variable-management.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.
