Updating custom variables

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:

  1. Click on
    • Login »  Surveys »  Edit »   Question's Logic icon
  2. Select Branching/Skip Logic.
  3. For each answer option, select the Jump To branching location.
  4. For each answer option, select a custom variable.
  5. Survey Software Help Image
    1. For select one 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.
    2. Survey Software Help Image
    3. For select many questions, select different custom variables for each answer option.
    4. Survey Software Help Image
    5. 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.
  6. A comment box will appear under the custom variable selected.
    1. 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.
    2. For questions where you want to pipe text based on text the user entered, leave the field blank.
    3. 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.
  7. Select the Default Destination in case no logic is triggered.
  8. Click Save Logic.
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:

  1. 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.
  2. 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.
  3. 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.

  1. ${custom1} Will be replaced with the data stored in the Custom Variable 1
  2. ${custom2} Will be replaced with the data stored in the Custom Variable 2
  3. ${custom3} Will be replaced with the data stored in the Custom Variable 3
  4. ${custom4} Will be replaced with the data stored in the Custom Variable 4
  5. ${custom5} Will be replaced with the data stored in the Custom Variable 5
  6. ...
  7. ...
  8. ...
  9. And so on till Custom Variable 20
  10. ${custom20} Will be replaced with the data stored in the Custom Variable 20

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:

http://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: http://test.questionpro.com

The ext_ref tag is appended as follows: http://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 many criterias can I add in a logic?

You can add upto 5 criterias in a logic.

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.

License

This feature/tools described here are available with the following license(s) :

Professional Edition and above- Buy Now - $15/Month