Custom Scripting based piping - How to?

Piping Text over multiple pages

Example 1:

Q1 Which sport do you play the most?

 Other __________
In the above example, you wish to ask respondents subsequent questions based on the sport they play. The in-built piping option will only work on the next immediate page. Also you cannot automatically pipe the text entered if other option is choosen. To set up the above Survey you will need to use Custom Scoring/Logic Script type question. For this you will need to update the Custom Variable 1 with the Sport and you can then base the branching on the selection and also use the text anywhere in the Survey.

The script for the above requirement is as follows:

#if (${Q1} == 1)

#if (${Q1} == 2)

#if (${Q1} == 3)

#if (${Q1} == 4)

#if (${Q1} == 5)
In the above script we check which option is selected for Q1 and depending on that we update the Custom1 variable with the correct text. If option 5 that is the Other option is selected then the Custom1 variable will get updated with the user input text. To reference the text entered for the Other option we use: "QuestionCode_OTHER" so in the above example QuestionCode is Q1 so we reference the User entered text using Q1_OTHER. We are also branching to the next question which is Q2 for each selection. If required we can branch to different questions based on the selection. You can use ${custom1} to replace the value stored in Custom1 variable. Once updated the Custom1 value can be used anywhere on the survey.

Following are the steps for setting this up:

  1. Setup the basic survey with all the questions
  2. Wherever you wish to replace the text for the sport which the user/respondent selected use ${custom1}.
  3. After Q1 add a Custom Scoring/Logic Script type question and enter the above script.
  4. Make sure there is a page break on Q1


This feature is available with the following licenses:

Team and Enterprise

Was this article helpful?
Sorry about that
How can we improve it?