> 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/core-concepts/formsort-quickstart-guides/template-your-variables.md).

# Template your variables

Sometimes you want to refer back to answers already collected in your flow and display those answers to a responder. A common use case of this is calling the responder by their first name, or reminding them of a choice they had selected in a previous question. This is called **templating variables**.

{% embed url="<https://www.loom.com/share/b476fa30487142e796c27874ae5d5918>" %}

### **How to do it in the Studio**

* In this flow, I asked a **Text question** to ask the pet’s name, and I named the variable `pets_name`

![](/files/rWUmGRm7g3ASA5eZrCvu)

* In my next two steps, I insert the answer variable `pets_name` from that question in double brackets.

![](/files/Jawcu0Z5VCZUZP7t6IMn)

You can always see a list of the variables you have available to you in the side bar under variables:

![](/files/qjoDgEE1ziO6o8Vh4awC)

### How it looks to a responder

![](/files/LqWF1kJwsILPr1Vn2dTr)

### Other resources

If you need to reformat the variables you collected, please refer to [Templating formatting functions.](/variable-templating.md#template-formatting-functions)

Use templated variables in [redirect URLs](/variable-templating.md#redirect-urls) and [image URLs](/variable-templating.md#inserting-answer-values-into-content).


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.formsort.com/core-concepts/formsort-quickstart-guides/template-your-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
