# Variables

### Intro

Variables are the fields that are used to fill in various data such as:

* text
* numbers
* currency
* date
* percent
* image.&#x20;

They are marked with blue brackets in the text.

To use variables, create them in the logic tree and insert them into the text.

This can be done in a couple of clicks:

<figure><img src="https://964135421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8cW4sX6ZsjpOR0gvSSD%2Fuploads%2FvtOVtI51ggQrLQnXgpd2%2Fcreate%20variable%20(1).gif?alt=media&#x26;token=b006b6a4-7292-4c1e-88b5-86cb84d1ce3a" alt=""><figcaption><p>Double click in the text area, double click in the logic tree to link it with the text</p></figcaption></figure>

Double click in the text area, double click in the logic tree to link it with the text

In the text area:

* select the text *OR* double click on any word *OR* double click in an empty space
* the toolbar pops out
* click the pink button in the toolbar
* double click the variable in the scheme to insert the variable.

Now your first variable has been created.

You may notice that the inserted variable has replaced the word you have selected prior to linking.

You can also use the right-click menu instead the toolbar to make the linking.

**Note:**

The toolbar only appears when you use the trackpad or a mouse, or when you double click in the text area.&#x20;

In other cases you should right click to use the menu.

### Types of variables

<mark style="background-color:yellow;">Text</mark> - text field where any kind of data can be inserted including numbers and various symbols

<mark style="background-color:yellow;">Number</mark> - accepts numbers only

<mark style="background-color:yellow;">Percent</mark> - number plus automatic percent symbol adds up

<mark style="background-color:yellow;">Currency</mark> - number plus automatic currency symbol adds up

<mark style="background-color:yellow;">Date</mark> - date in various formats are recognised upon insertion

<mark style="background-color:yellow;">Image</mark> - this field is designed to upload an image of a square size

### Settings

#### Quick settings

You can use quick settings to change the type of the variable.

When you change the type of the variable, it will have new properties.

<figure><img src="https://964135421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8cW4sX6ZsjpOR0gvSSD%2Fuploads%2F6zMyIjIHdqigBKuEwWBy%2FScreenshot%202023-02-26%20at%2022.04.46.png?alt=media&#x26;token=49392c7d-5080-40c9-b05f-1f8cd196b807" alt="" width="375"><figcaption></figcaption></figure>

#### Settings

Double click anywhere on the variable to get inside its settings *OR* click the right arrow.

<figure><img src="https://964135421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8cW4sX6ZsjpOR0gvSSD%2Fuploads%2FBbPtE1hzrj4sYXmMSiXe%2FScreenshot%202023-02-26%20at%2022.02.30.png?alt=media&#x26;token=e577d8f5-8d5c-45ef-a1a0-97d878f26039" alt="" width="375"><figcaption></figcaption></figure>

You can rename the variable 1) from the quick menu in the three dots and 2) inside the settings window.

### Instances

Any variable can inserted in the text as many times as needed.

Every time you insert the variable into the text you create its instance.

When you fill in a variable in the questionnaire, all the instances will be filled in with the same value.

In the logic tree, you can navigate between the instances of the variable from inside the settings tab using the arrows. As you click, the instances will be highlighted in the text area.

<figure><img src="https://964135421-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh8cW4sX6ZsjpOR0gvSSD%2Fuploads%2F0qE4BISO6nnAu37PQ2H1%2FScreenshot%202023-03-08%20at%2018.02.27.png?alt=media&#x26;token=edc539ff-91da-4bb6-99a4-48539b9694ae" alt="" width="375"><figcaption></figcaption></figure>

You can set up instance-specific settings in case you need them.

For example, you can set the format of the date as 2019/07/22 for instance 1, and you can set the format as 22.07.2019 for instance 1.
