Online Survey Tutorials

SurveyGizmo Tutorials and Help Documentation

Tutorial: Piping: Using Previous Answers in Later Questions

Piping within SurveyGizmo is the ability to use the reporting value(s) from one question in your survey (the source question) and use them in or with a later page or questions on a later page (target page or question). Let’s simplify this into the individual types of piping that are available within SurveyGizmo, first and foremost.

Simple Piping (also known as Merge Codes)

Displaying a single reporting value from a previous question on a later page, typically within the question title or descriptive text. The source question can be one of the following question types:

  • Text Field
  • Essay
  • Radio Button
  • Drop-Down Menus
  • Image Choice (single-select)
  • Contact Information Group (single text field within group)

Please note that while Merge Codes are available for other question types, such as a checkbox question or a table of radio buttons, the output will not be a single answer. In the case of tables, an HTML table is created, while with checkboxes you are presented with all selected answers, separated by a semicolon ( ; ).

Syntax – Merge Codes

An example of a merge code is [%%12:question%%], which represents the Reporting Value for a question that is stored by SurveyGizmo in the survey (a.k.a. the respondent’s answer).

To find the merge code, there are two options: Use the Simple Piping Wizard or find the Question ID and manually create the merge code.

  1. Use the Simple Piping Wizard
    • Go to a question that is after the question you wish to evaluate as part of the rule and click the Advanced Edit icon (the little notebook on the left side of the question). When the question opens up, on the right side of the Question Title box you will see a smaller box that includes the Simple Piping Wizard. Click the link at the bottom of that box that is labeled ‘Select a Variable’. A drop-down box will appear. Select the question from the list and a merge code will appear under the box. Copy that merge code and add it to your rule.
  2. Create the Merge Code manually
    • Go to the specific question which you wish to evaluate in the rule and click the Advanced Edit icon (the little notebook on the left side of the question). When the question opens up, on the right side of the Question Title box you will see a smaller box which includes the Question ID. To create the merge, use the format:
      [%%xx:%%]
      xx represents the question ID found in the question editor, e.g. [%%23:%%]
      To clarify, the code is a left square bracket ( [ ), two percentage signs ( %% ), the question ID, a colon ( : ), two percentage signs ( %% ), and a right square bracket ( ] ).

Option Piping

Using the reporting value(s) of [a] selected answer(s) from a previous question as the options (or possible answers) in a question on a later page. This option can be selected in the Advanced Edit of the target question. The source question can be one of the following question types:

  • Checkbox
  • Multiple Text Field
  • Continuous Sum
  • Text Field
  • Essay
  • Radio Button
  • Drop-Down Menus
  • Image Choice

If the target question is a table, option piping will pipe the source question’s reporting values as columns in the table. In most cases, question piping is desired when the target question is a table.

Question Piping

Using the reporting values of selected answers from a previous question to repeat a question on a later page for each answer selected. This option can be selected in the Advanced Edit of the target question. To represent the particular answer in each iteration of the question, you can include the merge code [%%PIPED_VALUE%%] in the question title, which will be replaced with the reporting value of the source question. The source question can be one of the following question types:

  • Checkbox
  • Multiple Text Field
  • Continuous Sum
  • Text Field
  • Essay
  • Radio Button
  • Drop-Down Menus
  • Image Choice

If the target question is a table, question piping will pipe the source question’s reporting values as rows in the table. In most cases, question piping is preferred over option piping when the target question is a table.

Page Piping

Using the reporting values of selected answers from a previous question to repeat a page for each answer selected. This option can be selected in Page Options and Logic for the target page. To represent the particular answer in each iteration of the page, you can include the merge code [%%PAGE_PIPED_VALUE%%] in the page (question titles or descriptive text), which will be replaced with the reporting value of the source question. The source question can be one of the following question types:

  • Checkbox
  • Multiple Text Field
  • Continuous Sum
  • Text Field
  • Essay
  • Radio Button
  • Drop-Down Menus
  • Image Choice

Page piping also offers the ability to repeat the page based upon a numeric reporting value, repeating the page x number of times, where x is the number reported in the question. This would be a single answer question with a numeric reporting value. The source question should be one of the following question types:

  • Text Field
  • Drop-Down Menu

It is important to select the checkbox option “Repeat this section by the VALUE (1,2,3,5) of the question above” when using this method.

Examples

Each of the following screenshots use the following piping survey. To see piping in action, feel free to take this survey as many times as you need. The below examples will show the target page within SurveyGizmo (Edit Survey).

Simple Piping

Question Piping

Page Piping

Page Piping – Values


If you have any further questions, please use our community forums.