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

Advanced Randomization using Custom Scripting

Setup script to randomize all questions

The Script for Randomization is as below:

#set($ary = ["Q3", "Q4", "Q5", "Q6","Q7","Q8"])
#set($ary = $survey.randomizeList($ary))

#foreach( $val in $ary)
 $survey.branchTo("$val")
#end
 

In the above script in the first statement questions Q3, Q4, Q5, Q6, Q7 and Q8 are added to a list and randomized in the second statement. Once randomized the survey branches to each question randomly.

Steps for setting this up:

  • Setup the basic survey with all the Questions.
  • Now to randomize questions 3 through 8 add the Custom Scoring/Logic question just before Q3
  • Enter the above script in the Custom Scoring / Logic question.
  • For Randomization to work there has to be a common block termination question with which the Survey should continue. In the above instance the Block Termination Question is Q9
  • Branch each of the Question in the above list i.e. Q3, Q4, Q5, Q6, Q7 and Q8 to Q9 which is the Block Termination Question and test the Survey!

Setup Randomization to randomly select 3 questions from a pool of 6 questions (N out of M)

The Script is as below:

#set($ary = ["Q3", "Q4", "Q5", "Q6","Q7","Q8"])
#set($ary = $survey.randomizeList($ary, 3))

#foreach( $val in $ary)
 $survey.branchTo("$val")
#end
 

In the above script questions Q3, Q4, Q5, Q6, Q7 and Q8 are added to a list and randomized. After randomization only 3 questions are returned to the list randomly and subsequently the survey branches to only those 3 questions.

Steps for setting this up:

  • Setup the basic survey with all the Questions.
  • Now to randomize questions 3 through 8 add the Custom Scoring/Logic question just before Q3
  • Enter the above script in the Custom Scoring / Logic question.
  • For Randomization to work there has to be a common block termination question with which the Survey should continue. In the above instance the Block Termination Question is Q9
  • Branch each of the Question in the above list i.e. Q3, Q4, Q5, Q6, Q7 and Q8 to Q9 which is the Block Termination Question and test the Survey!

You can use the same logic for Randomizing entire Blocks of Questions. To do so add only the first question in each block for Randomization and branch the last question of each block to the common block termination question.

License Restrictions

This feature/tool [Custom Scripting - Randomization] 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