Archive

Archive for the ‘Survey Logic’ Category

How To Use Question Variable Names in a script

October 12, 2015 Leave a comment

Overview

When scripting you often use functions which reference questions. These functions require you to specify the question index however using question indexes can make your script difficult to understand and maintain and in some cases can also be dangerous unless using QRef which again makes the code even more harder to understand. Therefore we’ve introduced the ability to reference questions using their Variable Names instead. To use variable names in your script:

Step 1: Check that the feature is turned on for your survey

Step 2: Using the variable names in your survey script

 

Step 1: Check that the feature is turned on for your survey

To check that the feature is turned on for your survey, open the survey and then:

  1. Check that the “Disable question symbols” option is not checked:

  2. In case it is checked, uncheck it.

 

Step 2: Using the variable names in your survey script

Once the option is turned on, you can now simply reference the question variable names in your script wherever a question index is expected. The engine has now defined all the question variables as internal variables that you can use. For example, we have a question called “Gender”:

Lets now write a start script in Q2 that prompts a message if the answer to the gender question was 1 (male):

As soon as we start writing “GE” the autocomplete already shows us there is a GENDER variable that we can reference, so now the script can look like so:

And so instead of using the question index (1) we used the question variable name (GENDER) which makes our script code much more readable. In addition, the GENDER variable name will maintain its index even if the question is moved from being index 1 to index 13 for example. This means there is now need to use QRef when using the variable names which is a huge plus!

That’s it!

Visit us at: http://www.dooblo.net

Categories: Survey Logic

How to: use functions across a script using the Advanced Scripts section

April 7, 2013 Leave a comment

Overview

While scripting a survey you may find out that a certain capability/calculation is needed across the survey (not only in one or two questions). For example a validation rule that repeats itself across many questions like phone number consistency. The Advanced scripts section of the script is meant to contain such functions. Once you’ve written a function in the advanced scripts, you can call that function from anywhere in your script, just by using the function’s name and its parameters (if exist).
This How-To will explain and show how you can set self-made functions in the advanced script and use them in your survey.

Step 1: Add the needed function to the ‘Advanced Scripts’

  1. Click on the ‘Script’ tab.
  2. Click on the ‘Advanced Scripts’ button.
  3. Add the self-made function.

Step 2: Use your self-made function in you survey

  1. For example you can use your function as a Validation rule
  2. For example you can use your function in the Start/End script of the specific question you want that calculation to be executed.

That’s it!

How to: set an answer in an answer scale to not be part of a randomization

April 7, 2013 Leave a comment

Overview

This How-To will explain and show how you can fix a specific part of your answer scale so it will not be part of the randomization but will maintain a fixed position.

Step 1: Add an answer scale to your survey 

  1. Following is a link to our manual on how to create an Answer scale: https://manual.dooblo.net/2009/12/14/chapter12

Step 2: Randomize your answer scale

  1. Select the question that you want to randomize its answers.
  2. Click on the ‘Advanced’ tab and click on the ‘Randomized answers/topics order’

Step 3: make a specific answer in you scale not randomize

  1. Click on the survey and click on the ‘Advanced’ tab.
  2. Select ‘Edit Answer Scales’.
  3. Move the bar to the right until you see ‘Do not random’.
  4. Pick the answer that you want not to random.

That’s it!

Survey Logic – Module 01: Overview

January 21, 2013 Leave a comment

Overview

This video introduces the SurveyToGo survey logic model.

return back to our videos page

Categories: Survey Logic, Videos

Survey Logic – Module 02: Skipping Logic

January 21, 2013 Leave a comment

Skipping Logic

This video covers the SurveyToGo skipping logic.

return back to our videos page

Categories: Survey Logic, Videos

Survey Logic – Module 03: Branching Logic

January 21, 2013 Leave a comment

Branching Logic

This video covers the SurveyToGo branching logic.

return back to our videos page

Categories: Survey Logic, Videos

Survey Logic – Module 04: Piping Logic

January 21, 2013 Leave a comment

Piping Logic

This video covers the SurveyToGo piping logic.

return back to our videos page

Categories: Survey Logic, Videos
%d bloggers like this: