Help/Support   
Online Surveys Made Easy
UNLIMITED Surveys, UNLIMITED Responses, Easy to Use
Email Address:
or Take a Tour
Learn how to setup delayed branching in surveys using custom scripting. Survey Software, Online Surveys, Survey Analytics, Survey Branching, Skip Logic, Custom Scripting, Custom Surveys How to set up Delayed Branching using Custom Scripting

Delayed Branching Senario:

For example in Q2 of the Survey you ask respondents to select their gender: Male/Female. Now based on this you want to display Q10 of the Survey only to Males and Q11 only to Females and all respondents should continue with the same question Q12 and the rest of the Survey.

When you use the Branch option under the tools console the Branching is executed immediately. The above example is that of delayed branching.

The script for the above requirement is as follows:

#if(${Q2} == 1)
 $survey.branchTo("Q10")
#end

#if(${Q2} == 2)
 $survey.branchTo("Q11")
#end
In the above script: Q2, Q10 and Q11 are question codes for the respective questions. The if statement checks if answer to Q1 was 1 (Male) or 2 (Female) and accordingly branches to Q10 or Q11

Following are the steps for setting this up:

Set up the basic survey with all the questions

Add the Custom Scripting/Scoring logic question after Q9 in the Survey

Set up the above Script in the Logic Question

Set up default Branching for Q10 and Q11 to Q12

Make sure there is a page break on Q9

How to check if a certain question is not answered?

#if(!${Q1})
 $survey.branchTo("Q3")
#else
 $survey.branchTo("Q2")
#end
The above script checks if Q1 is answered or not. If Q1 is not answered then the survey branches to Q3, else it branches to Q2.
Survey Setup
Survey Distribution
Survey Analysis / Reporting
Accounts/Billing/Licensing
Site Policies and Procedures
New User Registration / Account Management
Multi-User Accounts : Corporate Accounts
Survey Creation - Details
Survey Building/Authoring - Details
Sending Survey - Details
Survey Administration - Details
Survey Tracking - Details
Analysis and Reporting - Details
Complex Logic Surveys
Conjoint Analysis
TURF Analysis
Trend Analysis
Pricing and Billing
Upgrading Access Restrictions
Advanced Survey Options
Enterprise Toolsets
Salesforce.com Integration
Tutorials
Student Research Sponsorship
Other (Sales/Billing/Partnerships)
© Copyright SurveyAnalytics Survey Software a Division of Survey Analytics Enterprise Survey Software