With variables (also known as piping), you can dynamically reuse answers, data enrichment, or custom content throughout your survey. Think of personalizing an email invitation, a confirmation message, or a follow-up question. You can create variables for purposes such as:
- Reusing given answers anywhere in the questionnaire (in a question or an answer).
- Displaying a given answer in a confirmation message.
- Randomly showing certain questions (or statements) to respondents by assigning them a characteristic.
- Sending a confirmation message to an email address entered in the survey.
Creating a Variable
- Go to the ‘Questions’ menu > ‘Variable’.
- Click on ‘Quickly create variable using wizard’.
- Select the question whose (open) answer you want to use.
- Click ‘Next’.
- Under ‘Fill variable with’, choose how the variable should be populated.
- Give the variable a clear name, such as email or answer_question3.
- Click ‘Continue’.
Alternative Answer Text (Closed Questions)
After creating a survey variable and setting the variable rule, you can optionally define alternative answer text for each closed answer as a fill-in rule:
- Click ‘Variable Rule’ next to the created variable.
- For closed answers, enter an alternative text (e.g., ‘He’ or ‘She’).
- Leave open answers blank.
- Click ‘Save’.
After you have created the variable, this icon will appear at the right edge of the menu: . This contains the created variables and data enrichment. Both are indicated with different symbols. The variables can be identified by [{variable}] and the enrichment by [[enrichment]].
Process variable in e-mail
To include a variable in an email, go to the ‘Communication’ menu and open the confirmation email where you want to insert the variable.
For example, if you created an open-answer field for ‘Name’, you can insert the variable [[Name]] into the email.
In the confirmation message, the respondent’s name (as entered in the survey) will appear.
If you’ve collected the respondent’s name via an open question, create a variable from that answer and insert its code into the (confirmation) email.
User Agent
Want to know what kind of device the respondent is using? Manually create a variable called User Agent and set its fill rule to useragent. This variable will automatically capture the respondent’s browser and device type.