# Question Box

## Settings&#x20;

{% hint style="warning" %}
**Important**:&#x20;

This operation will pause the robot execution while the question box is not closed or answered.
{% endhint %}

## Settings

<figure><img src="https://1031980850-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5KHpWgHEwo0MpHCFtAb%2Fuploads%2F3GO51SNpLpduOKjRzBVT%2Fquestion%20box%20EN-US.png?alt=media&#x26;token=8c794e64-1ee7-46bd-871d-c12d4eda279f" alt=""><figcaption><p>General object layout</p></figcaption></figure>

#### Filling in the object:

| Field                              | Description                                                                                                                                                                                                                                         |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Title                              | It's the object's name and doesn't need to be changed, unless you want to identify it to make it easier to find it on the robot, for example: "Question Box - ask for user's email".                                                                |
| Object Identifier Name             | It is a object's singular identifier and doesn't need to be changed, but you can rename it if you want to find it more easily when using it on other objects. Just remember that this name must be unique and without spaces or special characters. |
| Insert a title / Insert a question | Texts that will show up in the window title of the question box.                                                                                                                                                                                    |

{% hint style="info" %}
**INTERPOLATION**

This is a technical concept used in programming and you don't need to worry about changing it at this point.
{% endhint %}

## USE CASES&#x20;

* It can be used in robots that need to capture user's information at run time, such as filling in personal data.
* Situations in which some code changes during the robot's execution, for example when it's necessary to log in to a website that uses 2-step verification and sends an SMS to the user containing a code. Just use the question box for the user to enter the code received and then the robot will continue with the execution.

## Example

To capture user's email and use the response.

**STEP 1:** Drag the object to Studio workspace and define the question to be asked.&#x20;

<figure><img src="https://1031980850-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5KHpWgHEwo0MpHCFtAb%2Fuploads%2FhftR1A5zcS8u7lJBh99q%2Fimage.png?alt=media&#x26;token=951e03cc-ec6c-4d56-9e94-3c980125ff9c" alt=""><figcaption><p>Filling in the "Question Box" object form</p></figcaption></figure>

This will be the question box result:&#x20;

<figure><img src="https://1031980850-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5KHpWgHEwo0MpHCFtAb%2Fuploads%2FpEvz1nmWdGWGqgwTwaYM%2Fimage.png?alt=media&#x26;token=e28eb154-efe8-4bb0-a9a9-2a45e203b318" alt=""><figcaption><p>Question box layout</p></figcaption></figure>

**STEP 2:** The email entered by the user in the question box will be automatically recorded in a variable in the robot's memory. To use it, find the name given to the object in the Question Box (Object Identifier Name).

{% hint style="info" %}
To learn more about variables, click [here](https://docs.roboteasy.tech/studio-en/studio/utilizar-variaveis).
{% endhint %}

<figure><img src="https://1031980850-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5KHpWgHEwo0MpHCFtAb%2Fuploads%2FLblsxMRPxNON5bpHE1sk%2Fimage.png?alt=media&#x26;token=c7534644-98a3-4578-83d1-8ce255c23bd3" alt=""><figcaption><p>Finding variable name</p></figcaption></figure>

**STEP 3:** Now we will use the "inputDialog1" variable in a [Message Box ](https://docs.roboteasy.tech/studio-en/studio/objetos/acoes-globais/caixa-de-mensagem)object which will show the text entered by the user on the screen.&#x20;

<figure><img src="https://1031980850-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5KHpWgHEwo0MpHCFtAb%2Fuploads%2FT5CxunnlSLtTZ4AhrnZF%2Fimage.png?alt=media&#x26;token=6188089b-0f51-41c2-a57a-1796c9f25522" alt=""><figcaption><p>Using a variable in the Message Box</p></figcaption></figure>

**STEP 4:** Run the robot and enter an email. Verify if the message box returns the right result.

<figure><img src="https://1031980850-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5KHpWgHEwo0MpHCFtAb%2Fuploads%2FyUSNA2At9h1EqJWQK2PL%2Fquestion%20box.gif?alt=media&#x26;token=abfd3459-9d74-45a9-a9f9-c3aa66a3bc5c" alt=""><figcaption><p>Example robot execution</p></figcaption></figure>

{% hint style="success" %}
In this example, we used the user's text to display on screen, but you could print it to a file, send it in an email, use it in any condition of your robot, etc.
{% endhint %}

### Download it:

{% file src="<https://1031980850-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq5KHpWgHEwo0MpHCFtAb%2Fuploads%2FXR0KK11AgPAbDOXNNqa0%2FQuestion%20Box%20Object.roboteasy?alt=media&token=ef496cdd-d1eb-44e6-be52-cdf442f34d6a>" %}
