Piping allows you to repeat previously collected data later in the survey. In this tutorial, we'll cover simple piping. Using simple piping, a.k.a merge codes, you can display a single answer from a previous question on a later page. This is typically used in the question title or in a text/instruction element.
Here is a sample survey with simple piping (aka merge codes):
http://www.surveygizmo.com/s3/2581125/Merge-Code-Demo-Survey
OR
Add this survey to your US account, EU account, or CA account to see how merge codes are setup!
Setup
Any time you wish to pull data from the answers your respondent previously provided (or their contact record in an email campaign) you can do so using merge codes. You can find a Merge Code helper on the editor toolbar available in text fields like question titles and text / instructions as demonstrated below.
To use merge codes:
- Place your cursor where you would like to pull in the data from your previous question.
- Click the Merge Codes dropdown menu on the editor toolbar.
- Within the Pages & Questions tab, click on an available previous question whose data you wish to pull.
- After clicking on the question, you will presented with the available merge codes for that question. This includes merge code for referencing the respondent's answer (most commonly used), as well as merge codes for each answer option. Answer option merge codes will be identified with: [Option].
- Click on the merge code that you want to select and the merge code will be automatically inserted at cursor!
In other places, like Hidden Value Actions, default answer fields, and Email Campaigns look for the Select a Merge Code link below the text field to bring up the Merge Code Tools:
Questions from previous pages will be available for you to select. After locating the items/merge code that you want to use, click the Insert link located to the right of the item to insert it.
If are using Reporting Values, you may find that you need to customize your merge code a little. If your merge code looks like this:
- [question("value"), id="3"] or [question("option value"), id="2"] - these are interchangeable and pull the Reporting Value for the answer selected.
- If you wish to pull the answer option that displays to the survey respondent instead, you'll want to change the merge code like so: [question("option title"), id="2"]; this will pull the answer option. If you are not using Reporting Values, no need to worry, all of these merge codes will work to pull the selected answer option!
This is the simplest form of piping. If you are looking for more piping options such as repeating questions and pages based on selected answers check out our other piping tutorials:
Compatible Question Types: Simple Piping
The source question for simple piping can be one of the following question types:
- Radio Buttons
- Dropdown Menu
- Image Select (single)
- Textbox
- Essay/Long Text
- Contact Form (single text field within group)
Merge Codes are available for other question types, such as checkboxes, however, the output for multiple-select questions will often not be a single answer and will be displayed as an array. Please see the Merge Codes Tutorial for further examples.
Troubleshooting
Are you having trouble selecting a question as your source question? There are two possible reasons as to why your question would not be showing up as your source question:
- The question you are trying to pipe from is not compatible. The only compatible question types for source questions at this time are:
- Radio Buttons
- Dropdown Menu
- Image Select (single)
- Textbox
- Essay/Long Text
- Contact Group (single text field within group)
- Your source question is not on a previous page to the question you're trying to pipe to. Any question you are trying to pipe from must be on a previous page.
Admin
— Bri Hillmer on 01/18/2019
@Nick: You're on the right track! You do need piping but a slightly different kind. Here is our tutorial on option piping which should be exactly what you need to accomplish what you describe:
https://help.surveygizmo.com/help/option-piping
I hope this helps!
Bri Hillmer
Documentation Coordinator
SurveyGizmo Customer Experience Team
— CRE on 01/18/2019
I'm not sure this is exactly what I need, but maybe it is. I have a checkbox question with 6 answers (select all that apply). In the following question I want it to be the same question, but a multiple choice (select one) that only provides the options they selected in the previous questions. Is piping what I need to be exploring here or is there another way to accomplish that?
Admin
— Bri Hillmer on 12/14/2018
@Steve: When option piping, there is not currently a way to customize the text of the answers that are piped.
If you are using the repeating feature you can leverage the values merge code over the title merge code in order to pull different text.
For example in question repeating there are 2 merge codes available to display in the question text:
[question("piped title")]
[question("piped value")]
Using reporting values, you could change the text of the option and then pull this using the value merge code.
Here is our tutorial on reporting values: https://help.surveygizmo.com/help/reporting-values
I hope this helps!
Bri Hillmer
Documentation Coordinator
SurveyGizmo Customer Experience Team
— Steve on 12/14/2018
What if I'd like to alter the text in the piped answer?
For instance, if the answer "Yes, the blue one" was selected, but I'd like the subsequent piping text to just read "the blue one".
Is this achievable? I've tried the advanced merge code replace/with function but it doesn't seem to be working in my survey.
Admin
— Dave Domagalski on 12/05/2018
@Jack: Thank you for your question!
Based on your description, Option Piping should get you exactly what you are looking for:
https://help.surveygizmo.com/help/option-piping
One thing to keep in mind is that you will need to make sure that Q1 and Q2 are on separate survey pages.
I hope this helps!
David
Documentation Specialist
SurveyGizmo Customer Experience
— Jack on 12/05/2018
I want to ask a multicode question along the lines of
"Q1 Which of the following sources of information do you use?" and then a follow up question.
"Q2 From those selected which is the main source? " which will be a single code. How do I pipe through Q1 responses into Q2?
Admin
— Dave Domagalski on 04/19/2018
@Paula: Thank you for your note, and sorry for the trouble!
There are a couple of reasons why the question that you are looking for is not appearing in the pipe into options menu:
1. The question that you want to pipe from is not compatible as a source for piping. You can view the 'questions you can pipe from' here:
https://help.surveygizmo.com/help/option-piping#questions-you-can-pipe-from
2. The question that you are trying to pipe from is on the same survey page as the question you are wanting to pipe into.
There must be a page break between the question that is piped from or the question that is piped into. You can add page breaks via the instructions here:
https://help.surveygizmo.com/help/page-breaks
I hope this helps clarify!
David
Documentation Specialist
SurveyGizmo Customer Experience
— Paula on 04/19/2018
When I click on Pipe into Options, the question I want doesn't appear. Is there a way to type it in manually?
Admin
— Bri Hillmer on 05/10/2016
@Juliette: Indeed there is. Check out this tutorial to learn how to set this up:
https://help.surveygizmo.com/help/article/link/repeat-unselected-items
Bri
Documentation Coordinator/Survey Sorceress
SurveyGizmo Customer Support
— Juliette on 05/10/2016
Hello!
Is it possible to display the options that have NOT been chosen in a previous questions?
Example: Why did you not visit [options that were not selected in the previous question]?
Thank you!
Admin
— Bri Hillmer on 11/24/2015
@Tatiana: I am sorry to say that we do not have the functionality you describe. If you have someone on your team that is fluent with custom scripting or JavaScript they might be able to build this for you. Here is our scripting documentation if you want to try your hand at this:
http://script.surveygizmo.com/help
Another idea would be to check out one of the websites below. These websites have developers available that can build these features for you.
www.odesk.com
www.rentacoder.com
www.guru.com
I hope this helps!
Bri
Documentation Coordinator/Survey Sorceress
SurveyGizmo Customer Support
— Tatiana on 11/24/2015
Hello! I'm wondering, if I can show only a certain number of options the respondent checked in the previous question? According to the task, I have to show three random options of all the options respondents checked in the previous question. Thank you!
Admin
— Bri Hillmer on 11/16/2015
@Johnweist: While the Image Select question is not available for piping you can instead use a Radio Button or Checkbox question with images as answer options which you can then pipe from. Here is our tutorial on using images as answer options:
http://help.surveygizmo.com/help/article/link/use-images-as-answer-options
I hope this helps!
Bri
Documentation Coordinator/Survey Sorceress
SurveyGizmo Customer Support
— Johnwiest on 11/11/2015
OK, almost there, but does SurveyGizmo permit PIPING IMAGES when the image is selected in a prior radio button question? I'm conducting some packaging research and I want respondent to answer follow on questions with the package he/she selected right in the question.
Admin
— Dave Domagalski on 09/01/2015
@Donna: That is a great question! The page that contains the source question can be any page previous to the page where you are using the merge code.
I hope that helps!
David Domagalski
Survey Explorer
SurveyGizmo Customer Support
— Donna on 08/31/2015
Hi Bri - Does the source page have to be IMMEDIATELY previous to the landing page? Or, can the source page be ANY previous page in the survey? Thank you.
Admin
— Bri Hillmer on 06/17/2015
@Martin: This could be achieved with some custom scripting. If you have someone on your team that is fluent with custom scripting or JavaScript they might be able to build this for you. Here is our scripting documentation if you want to try your hand at this:
http://script.surveygizmo.com/help
Another idea would be to check out one of the websites below. These websites have developers available that can build these features for you.
www.odesk.com
www.rentacoder.com
www.guru.com
Thanks for taking a look at our documentation!
Bri
Documentation Coordinator/Survey Sorceress
SurveyGizmo Customer Support
— Martin on 06/16/2015
I'm wondering if I can use a randomly number (from a hidden value) to select from a set of words to display a randomly generated code.
For example, generate two random numbers, each from 1 to 3. For each combination, a different phrase is displayed. This would be accomplished by concatenating one word from the first set (Abraham,William,George) and one word from the second set (Hat, Shirt,Pants), as below.
The Excel style pseudocode for this would be:
if(RndOne = 1, "Abraham",if(RndOne=2,"William","George")) & if(RndTwo=1,"Hat",if(RndTwo=2,"Shirt","Pants"))
with the results below.
This is useful for generating a random completion code that follows a predictable but hard to guess pattern.
Thanks!
1,1 = AbrahamHat
1,2 = AbrahamShirt
1,3 = AbrahamPants
2,1 = WilliamHat
2,2 = WilliamShirt
2,3 = WilliamPants
3,1 = GeorgeHat
3,2 = GeorgeShirt
3,3 = GeorgePants
Admin
— Bri Hillmer on 05/05/2015
@Jeff: It sounds like you are are passing first name into the survey via a URL. You actually don't even need to store this in a hidden value. URL variables are stored by SurveyGizmo by default. So you can just reference the merge code [url("firstName")] and it will pull this information if present!
Check out our URL Variable tutorial:
http://help.surveygizmo.com/help/article/link/url-merge-codes
and our Using URL Variables Tutorial for more info:
http://help.surveygizmo.com/help/article/link/using-url-variables-in-surveys
Thanks for your great questions!
Bri
Documentation Coordinator/Survey Sorceress
SurveyGizmo Customer Support
— Julie on 05/04/2015
Any way to pipe the value from a HIDDEN VALUE ACTION, such as Value: [url("firstName")]?!! Thanks.