Consider an example where you are asking users about which ISP they use and based on their selection, you want to ask more follow-up questions. This can be done using Piping Text and updating the Custom Variable with the required text. Updating custom variables within a survey is useful because you can pipe responses over multiple pages. This custom variable can then be used anywhere on the survey using the right code for the variable. Steps for setting this up are as follows:
- Go to:
- Login » Surveys » Edit » Question's Logic icon
- For each answer option, select the Jump To branching location.
- For each answer option, select a custom variable.
- Click on the button Save Logic.
- For single select (radio button) questions, be sure that the same custom variable is selected for each answer option. As can be seen in the image below, all answer options will have Custom Variable 1 selected as the variable to be replaced with piped text.
- For multiple select (check box) questions, select different custom variables for each answer option.
The selected custom variable(s) will get updated with the set text. You can now refer to this variable in later survey questions or set up logic based on the custom variables.
Updating Custom Variables with piping text will not work with Multi-lingual surveys.
A few things to remember:
- Keep in mind any custom variables you may desire to map using information in an email list. Depending on the custom variables you have uploaded or will upload in an email list, you will need to select the appropriate custom variable number to assign piped text. For example, if you have uploaded an email list with the format Email Address, Custom Variable 1 (FirstName), Custom Variable 2 (Last Name), Custom Variable 3 (Department), you will want to be sure that the piped text is assigned to Custom Variable 4.
- When you update custom variables on a survey, they take precedence over custom variables uploaded along with the email address. So if you upload a custom variable along with the email address as custom variable 1 “${custom1}” and the same custom variable 1 is updated midway in the survey, then the value passed via the email address will be lost. A good rule of thumb might be to upload the email address list and then select the custom variables to be updated using piping text after counting the number of custom variables you will be using from the email address list.
- Make sure you are not updating the same custom variable in two different questions. The latest information will get updated to the custom variable, overwriting the text that existed earlier in that custom variable. Basically, the rule of thumb is that the latest information mapped to a custom variable is the information that will stay assigned to the custom variable. Though you might upload an email list after setting up the survey, the responses gathered come later than uploading the email list.
- For questions where you want to define the text that is to be displayed after piping, enter the text in the Piping Text (Optional) field.
- For questions where you want to pipe text based on text the user entered, leave the field blank.
- For close-ended questions where you want the answer option to show up as it is, leave the field blank in this case as well.
- Please make sure you test the survey and also check how the responses are saved before making the survey live.
How can I replace text within the questions/answer options with custom variables? What are the variables and codes available?
You can use the following variable tags. Use them wherever you wish to display the text.
- ${custom1} Will be replaced with the data stored in the Custom Variable 1
- ${custom2} Will be replaced with the data stored in the Custom Variable 2
- ${custom3} Will be replaced with the data stored in the Custom Variable 3
- ${custom4} Will be replaced with the data stored in the Custom Variable 4
- ${custom5} Will be replaced with the data stored in the Custom Variable 5
- ...
- ...
- ...
- And so on till Custom Variable 255
- ${custom255} Will be replaced with the data stored in the Custom Variable 255
What is the External Reference Variable?
External Reference Variable is an another variable which can be used to pass in data to the Survey. The External Reference variable (i.e. ext_ref) is used to associate responses to their respondents. You can assign an ID number or anything else that will uniquely identify a respondent to the ext_ref variable. When the results are collected the ext_ref variable is captured and stored with the other data.
How can I use the ext_ref variable with my own email program/provider?
Every survey that you create will have a unique URL. To include other data to be captured along with the survey data you just need to add the ext_ref parameter to the URL. For example:
https://questionpro.com/t/AIZBjs6?ext_ref=xxxx
Replace xxxx with your unique id for the respondent.
I am using Customized URL. How to pass the ext_ref variable with customized URL?
The ext_ref parameter can be passed along with the URL in the following format:
For Example: The URL for the survey is: https://test.questionpro.com
The ext_ref tag is appended as follows: https://test.questionpro.com/?ext_ref=xxxx
Are there any limitations?
The External Reference Variable can store up to 64 characters.
You can use Alphanumeric Characters (A to Z, a to z, 0 to 9).
Accented characters or characters from languages other than English may not get saved. Please limit the character use to English.
You cannot use the Pound/Hash [#] in the External Reference Variable
We recommend you not to use Comma and Quotes in the ext_ref/custom variable.
How can I use the ext_ref with the Email/List Manager?
If you are using the Email/List Management interface to send out email add the following tags to your survey invitation:
<SURVEY_LINK>&ext_ref=xxxx
<ANONYMOUS_SURVEY_LINK>&ext_ref=xxxx
The &ext_ref variable is automatically captured in the raw response data.
Note: The mail merge tags are special variables that are used in Email List Management in tracking the email addresses of respondents. Simply append the &ext_ref=xxxx to the end of the mail merge tags.
あなたも興味があるかもしれません...
Piping - How To?
Dynamic Replacement of Custom Variables | Data Pre-Population - How to?
Branching/Skip Logic
Compound Branching
How to use custom variables to save time in data analysis