Piping Syntax

This article will show you how to pipe in text and/or values into followup questions 


Background

You may need to be able to PIPE, or display, either the text and/or value of a prior question somewhere else in the survey. This article will provide you with some examples and helpful hints on how to do so. 


Piping Syntax

In order to pipe in values or text based on prior answers, you can use the following syntax:

  • For items with one response (radio questions) 
    • For the value: [[Q32]]
    • For the text: 
      • If you wanted the text as is in the prior question, use: [[Q32:TEXT]]
      • If you wanted to make the text all LOWER case, use: [[LOWER Q32:TEXT]]
      • If you wanted to make the text all UPPER case, use: [[UPPER Q32:TEXT]]
      • If you wanted to capitalize the first letter of each word, use: [[PROPER Q32:TEXT]]
  • For multi-dimensional questions like a checkbox, you would have to refer to the individual response. 
    • For the value: [[Q34_1]]
      • This would return a 0 or 1 for 'Apples' depending on if it were selected or not
    • For the text: [[Q34_1:TEXT]]
      • If you wanted the text as is in the prior question, use: [[Q34_1:TEXT]]
      • If you wanted to make the text all LOWER case, use: [[LOWER Q34_1:TEXT]]
      • If you wanted to make the text all UPPER case, use: [[UPPER Q34_1:TEXT]]
      • If you wanted to capitalize the first letter of each word, use: [[PROPER Q34_1:TEXT]]
      • Note: This will give you the text for the specific response regardless of it being selected or not
  • For piping 'Specify' text, you want to refer to the value of that field ONLY since the value is the entered text. 
    • If you wanted to refer to the exact text added into a specify, use: [[Q50_4:SP]] or [[Q50:4:SP]]
    • If you wanted to make the text all LOWER case, use: [[LOWER Q50_4:SP]] or [[LOWER Q50:4:SP]]
    • If you wanted to make the text all UPPER case, use: [[UPPER Q50_4:SP]] or [[UPPER Q50:4:SP]]
    • If you wanted to capitalize the first letter of each word, use: [[PROPER Q50_4:SP]] or [[PROPERLY Q50:4:SP]]
    • Note: You do not have to add the ':TEXT' since the value is the entered text.

Examples

Example 1: Piping a previous response

Lets say you have Q32,a radio question (choose one) and you selected option 1.  See below:

You then have a followup open end that you want to know, "Why did you say "Answer from Q32" are your favorite?". You would use the syntax below while programming: 

  • Using the standard piping would look like this:
    • Question Text: Why did you say [[Q32:TEXT]] are your favorite?
    • Respondent View: Why did you say Apples, oranges and bananas are your favorite?
  • Using LOWER
    • Question Text: Why did you say [[LOWER Q32:TEXT]] are your favorite?
    • Respondent View: Why did you say apples, oranges and bananas are your favorite?
  • Using UPPER
    • Question Text: Why did you say [[UPPER Q32:TEXT]] are your favorite?
    • Respondent View: Why did you say APPLES, ORANGES AND BANANAS are your favorite?
  • Using PROPER
    • Question Text: Why did you say [[PROPER Q32:TEXT]] are your favorite?
    • Respondent View: Why did you say Apples, Oranges And Bananas are your favorite?
Example 2: Piping in Specify text

Lets say you have Q50, a checkbox question (select all that apply) and you wanted to pipe in the text entered into a specify option somewhere else in your survey.  See below:

You then have a followup question and you want to show the text entered here vs 'Other (please specify)'. You would use the syntax below while programming: 

  • Using the standard piping would look like this:
    • Response Text: Why did you say [[Q50:TEXT]] are your favorite?
  • Using LOWER
    • Response Text: Why did you say [[LOWER Q50:TEXT]] are your favorite?
  • Using UPPER
    • Response Text: Why did you say [[UPPER Q50:TEXT]] are your favorite?
  • Using PROPER
    • Response Text: Why did you say [[PROPER Q50:TEXT]] are your favorite?

Your response list would look like this:

Example 3: Piping in the item ranked number one in a Numeric Ranking Question

Lets say you have a Numeric Ranking Question called "Q1" and in a follow-up you want to display the text/label for this specific punch without creating addition variables. Here you would use our standing Piping Syntax in combination with some of our Logic Syntax. 

Here is your formula. Just replace the "Q1" with your specific question number. 

[[(Q1:(AT((SORT_ASC(Q1)),1)):TEXT)]]

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us