# Set Variable

> **Who can use this Card?**
>
> * Gallabox Users having permission to either build and deploy bots or manage bots.
> * Available on all paid plans.

### Overview

Imagine **Variable** as a box, which can be named and you can store "things". In this scenario, "*things*" are values (numbers, texts, dates, etc...).

**Set Variable** is a powerful block that allows you to create, select format, and set a value to a variable.

To use the card, select it from utilities.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FT7GiXhu3l2mUJPSNMM8A%2FSet%20Variable%201.1.png?alt=media&#x26;token=3793b4e9-dcc2-41e3-beb2-8edafe02da70" alt=""><figcaption><p>Set variable Card in Utilities</p></figcaption></figure>

{% hint style="info" %}
Learn more about the concept of a [variable](https://www.tynker.com/blog/how-to-teach-variables-to-kids/) from this article.
{% endhint %}

### Setting a Variable

You can select a variable that already exists or create a new one.

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FP0YF05KJrWnny3JKc0yU%2FSet%20Variable%201.2.png?alt=media&#x26;token=902ab1b4-c3cc-4fe0-af36-b2ee17975d28" alt=""><figcaption><p>Select a Variable</p></figcaption></figure>

{% hint style="info" %}
Variable name should start with alphabet; Cannot have special characters except underscore (\_).
{% endhint %}

Just type the name, select the format, and click on "create".

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FgfxEKb54Ltb2vHUttf8F%2FSet%20Variable%201.3.png?alt=media&#x26;token=5783e96e-b849-4564-9064-1475dfe85c07" alt=""><figcaption><p>Selecting the Format</p></figcaption></figure>

When it comes to selecting the format of the variable, you have 6 formats to choose from.&#x20;

* Text
* Number
* Boolean
* Date
* Object
* Array

### Typing the Value

You can type the value you want to give to the variable. You can also make it depend on other variable values.&#x20;

In the below screenshot, we have named the variable as **phone\_book** and made the value dependent on other variable as **recipient.phone**.&#x20;

<figure><img src="https://3137140735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZcl3T6ePz95GpzjAeOLW%2Fuploads%2FfsSLYaRFmfpiqNCeEoMn%2FSet%20Variable%201.4.png?alt=media&#x26;token=3713fbfa-aae5-49e9-89a2-7f0143e02172" alt=""><figcaption></figcaption></figure>
