Help/Support   
Online Surveys Made Easy
UNLIMITED Surveys, UNLIMITED Responses, Easy to Use
Email Address:
or Take a Tour

Custom Scripting : Multiple Select Questions - How to?

Consider the following scenario:

Q1: Which games do you play?

    Baseball
    Basketball
    Soccer
    Tennis

The above question is a Multiple Select type question. Now, if respondents select the answer option Baseball and Basketball you want to branch them to Q2, else you want them to branch to Q3.

The script for the above example is as follows:


#if (${Q1_1} == "1" && ${Q1_2} == "1")
    $survey.branchTo("Q2")
#else
    $survey.branchTo("Q3")
#end

What is the difference between referencing a multiple select type question (Check Box) versus single select question (Radio Button)?

Question code for the question is Q1

If the question is a Multiple Select type question then the answer options are referenced as follows:

  • First answer option: ${Q1_1} == "1", Second answer option: ${Q1_2} == "1", Third answer option: ${Q1_3} == "1" and so on...
  • To check if the answer option was selected, check if it equals to "1" for example: #if (${Q1_1} == "1"). Unlike single select question type 1 should be within quotes.

If the question is a single select type question then the answer options are referenced as follows:

  • First answer option: #if (${Q1} == 1), Second answer option: #if (${Q1} == 2), Third answer option: #if (${Q1} == 3) and so on...
  • To check if the answer option is selected, check it with the position of the answer option. Quotes are not necessary in this case.

License Restrictions

This feature/tool [Custom Scoring Logic and Dynamic Scripting] is not available as part of any of our standard self-service licenses. It is part of our Enterprise Service License. Please contact your Account Manager for pricing and options for purchasing the Enterprise Service License.

Please Visit Survey Analytics to learn more about Enterprise Solutions

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 2010 SurveyConsole Survey Software a Division of Survey Analytics Enterprise Survey Software