> For the complete documentation index, see [llms.txt](https://docs.formsort.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.formsort.com/response-data-collection-and-management/variable-schema/variables-from-questions.md).

# Variables from questions

By creating questions, answer variables are created by default, using the title of the question automatically. It's a good idea to rename the auto-generated answer values to something that's a better reference. For example, a question with a title "What is your name?" will auto-generate an answer variable name of `what_is_your_name`, which is overly verbose. Something like `user_first_name` is much clearer.

### Viewing answers collected in questions

In the **Variables -> From questions** list you will see the answers that result directly from questions presented to the user. When an answer is selected, you will see a link to the relevant question in the content editor.

### Providing the same answer with two different questions

Sometimes, you will want to collect the same answer by asking two different questions, like when you want to ask for a user's email in two different paths in a flow.

To do so:

1. Create the first question
2. Set its **Answer variable name** to your desired value
3. Create the second question
4. Set its **Answer variable name** to the same one as for the first question
5. You will be prompted with a message: *This variable name is already in use.* Choose **Re-attach to existing variable** to re-use the existing question's variable.

Note that you will only be able to re-use answer variables with compatible answer types, such as using a `string` variable with `text` questions. If you are trying to add multiple select questions that all set the same answer variable, please ensure that they have the same set of choice values.

{% hint style="info" %}
An easy way to provide the same answer with two different questions is to use copy + paste. While pasting you will be provided with an opportunity to determine how the questions map to the answers in your flow, and you can choose **Map to an existing variable.**
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.formsort.com/response-data-collection-and-management/variable-schema/variables-from-questions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
