Piping variables between survey pages in SurveyEngine

Piping variables between survey pages in SurveyEngine

Variable piping allows you to reference a respondent's earlier answers in later question wording, making the survey feel personalised and reducing re-statement of known facts.

How to implement variable piping in SurveyEngine surveys and the use cases where it adds most value.

Tutorials

The problem

Variable piping inserts the value of a survey variable into the text of a later question or page. A screener that collects the respondent's current treatment can then display that treatment name in the preamble to the choice tasks: 'You told us you are currently taking [treatment]. In the following questions...'

Without piping, surveys must either ask for the same information twice or use generic phrasing that feels impersonal. Generic phrasing reduces engagement, particularly in patient surveys where respondents are experts in their own condition.

Why piping matters for DCE research

Piping in pivot designs is technically necessary, not just an engagement improvement. Pivot attribute levels are computed from the respondent's reference data - those calculations require the piped values to be stored as survey variables.

Piping also enables internal consistency checking. If a respondent pipes their stated travel time into a later question asking them to confirm it, inconsistencies are detectable before the choice tasks begin.


Using variable piping in SurveyEngine

Step 1: Identify the variables to be piped. What information from early questions will be referenced in later questions?

Step 2: Store the value as a named variable. In SurveyEngine, assign a data label to the source question that will be referenced in the pipe.

Step 3: Insert the pipe reference in the target text using the expression syntax: {variable_name}.

Step 4: Test piping with multiple different input values in preview mode. Confirm that edge cases - very long responses, numeric values, empty responses - display correctly.

Step 5: Handle missing values. Specify what displays if the piped variable is empty - either a default value or a conditional display condition that hides the piped text.

Worked example - pivot design with piping

A transport SP survey collects the respondent's current commute time in the screener. The SP choice tasks then reference this value in the status quo alternative: 'Your current journey takes [commute_time] minutes. Alternative A would take...'

Testing reveals that respondents who enter their commute time as a range ('45-60 minutes') cause the pipe to display the literal string rather than a numeric value. The screener is revised to use a numeric entry field with a suffix of 'minutes'.


References


Ready to set up variable piping in your survey? Log in to SurveyEngine and follow the survey building tutorial.

Monthly. Annual. Procurement Friendly.
No obligation · 30-minute call

Or Contact us at support@surveyengine.com — we're glad to help.


Related articles


Scroll to Top