The Script for this would be as follows:
$survey.updateCustom1("${Q1_1}") $survey.branchTo("Q2")Here Q1 is the Question Code for the Open Ended / Text input type question. And we reference the value by Q1_1 which is the first text box/field for the Question (There can be multiple text boxes for a single question). Q2 is the next question in sequence. When respondents enter the name of the Restaurant it is saved in Q1_1. Custom Variable 1: Custom1 is updated with this value and now can be used anywhere in the rest of the Survey.
Q2 How many times do you visit Tacano's every month? Now you ask respondents how many times they go to a certain Restaurant each month and depending on that you wish to branch respondents to followup questions. Now if respondents enter 0 (if they do not go to that restaurant), then there is no point in asking the subsequent questions. See the below given script to see how to set this up.
#if (${Q2_1} == "0") $survey.branchTo("NewBlock") #end #if (${Q1_1} != "0") $survey.branchTo("Q3") #endThe above script checks if the user input is 0. If the user enters 0, they are branched to the next questions starting with QuestionCode NewBlock. If the user entered value is not 0 then they are branched to Q3 and asked followup questions.