> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autoflow.tools/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Variables In AutoFlow Studio

> Learn how to set and get variables in your tests

# Setting a Variable in AutoFlow Studio

<iframe width="560" height="315" src="https://www.youtube.com/embed/HviN6t7-358?si=RlbxvxvGSnKIV4k4&start=111" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen;" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

## Setting a Variable

#### 1. In recording or editing mode, click on the 'pencil' icon to edit the input step

#### 2. At the bottom of the input modal, there's a checkbox with 'Set as variable'. Select that checkbox.

<Tip> You can even set randomized values as variables. To learn more about how to randomize test data, go to the '[Randomization](randomizing-data-on-every-run)' section. </Tip>

#### 3. In the input field, enter the name of the variable

#### 4. Once done, click on the Save button

#### 5. You'll see the indicator within the step that you've set a variable.

***

## Getting a Variable and Using Its Value

You can use the variable you just set in the previous section with a few clicks.

<iframe width="560" height="315" src="https://www.youtube.com/embed/LABDnBANkPc?si=10OD_0haWrqiQmM5" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen;" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen />

#### 1. Click on any step's pencil icon to edit it (preferably input modal)

#### 2. Select the 'Get from variable' radio button

#### 3. Done! On the sidebar, you'll see a badge within the step to indicate that you're using a variable in this step
