Basic References

Reference previous answers to create dynamic, personalized surveys.

Simple References

Reference any previous question by wrapping its name in curly braces.

{question_name}

Q1: What is your name?

Question name: name

Q2: Hello {name}, how old are you?

Where to Use

References can be used in question text to display previous answers, in display conditions to show or hide questions based on values, in calculate fields to compute with arithmetic, in constraints to validate against other values, in choice options to dynamically populate selections, in table row and column labels to generate dynamic rows/columns, and in table number column default values. You can only reference questions that appear earlier in the survey. Forward references are not allowed.

Question Text: Display previous answers
Display Conditions: Show or hide based on values
Calculate Fields: Compute with arithmetic (Calculate type only)
Constraints: Validate against other values
Choice Options: Use {question_name} as an option to dynamically populate from previous answers
Table Rows: Use {question_name} as a row label to generate one row per answer value
Table Columns: Use {question_name} as a column label to generate one column per answer value
Table Default Values: Use {calc_field} as a number column default to auto-populate cells
Note: Arithmetic (*, /, +, -) and ternary operators (? :) only work in Calculate question types

Common Examples

Personalized greeting: Welcome back, {name}!
Confirmation: You selected {choice}. Is this correct?
Conditional display: {has_children} === 'yes' (Show question only if they have children)
Dynamic dropdown: Add {crops} as an option → each selected crop becomes a choice
Dynamic table columns: Set column label to {crops} → one column per crop at fill time

Repeat Group Sibling References

Inside a repeat group, use the dot-prefix syntax to reference sibling sub-questions within the same instance.

Sibling reference: {.sub_question_name} — references a sub-question in the current repeat group instance
Example: In a repeat group with "price" and "quantity" sub-questions, a calculate sub-question can use {.price} * {.quantity}