Survey Galaxy Logo

Branching Logic Made Easy

Branching Logic

Branching logic is the term used that will allow respondents to automatically skip, or if relevant, answer a number of follow-up questions, depending on how they respond.

Although the need to include branching logic within a survey can often be avoided (often making the survey more streamlined and less complex) there are occasions when branching logic is both required and necessary.

Branch To

As the name implies 'Branch To' is the term used that allows you to created branches within a survey that are followed according to how each participant answers. 'Branch To' is only applicable to questions that have a 'Single Selection - Radio' response.

Jump To

Unlike 'Branch To' 'Jump To' can be applicable to any survey item and can also be used as a default branch, to be followed if no other specified branch logic has been taken; or used simply as a method of breaking up a survey up into sections.

Example

The following example shows a traditional printed survey where depending on how each respondent answers they are asked to complete different questions. The logic of the survey has been highlighted in colours to show the path a respondent would take depending on how they respond.

 

Display of a traditional printed survey using Go to statements

Activating Branching

To automate the above example using Survey Galaxy the question/answers are created using the Survey Galaxy composer and from the composer the branching logic activated by switching the 'Preview Pane Mode' of the dynamic display to 'Branches':-

Display switching preview pane mode to 'Branches'

With the 'Preview Pane' set to 'Branches' mode a 'Branch To' selection box will be displayed against each 'single selection radio' response and 'Jump To' selection boxes against every item:-

Display showing survey when Preview Pane Mode is set to 'Branches'

In the example for respondent who answer 'Yes' to Question 1, the next question that they should be asked is Question 2, while for respondents who select 'No' we will want the survey to skip Question 2 and branch instead to Question 3.

To apply this logic we first deal with the 'Yes' option and click on the first questions 'Yes' 'Branch To' selection box:-

Display showing how to set Question 1 to branch if respondent selects 'Yes'

All the valid branches are displayed and we set the branch logic by clicking on the item that corresponds to question 2:-

Display to select a 'Branch to' value

The display will then be updated to show the branch that has been specified for respondents who answer 'Yes' to the first question:-

Display showing Question 1 'Yes' answer with a branch specified

Likewise, for those respondents who select the 'No' response the branch logic for the 'No' response is set to point to Question 3:-

Display showing Question 1 'No' answer with a branch specified

In the example we want the respondents who answer 'Yes' to Question 1 to skip to Question 4 after they have answered Question 2. In this case we will use Question 2's 'Jump To' field to define a default branch:-

Display showing how to set Question 2's 'Jump to'

As with 'Branch To' the 'Jump To' will list all the valid 'Jump To' options:-

Display showing selection of 'Jump To' value

Using the example Question 2's 'Jump To' field is set by selecting Question 4's entry from the list:-

Display showing Question 2's 'Jump to' value set

In a similar fashion branching logic is applied to the rest of the survey. If no branch is specified the survey will continue with the next question and we can see here that as Question 5 will naturally follow Question 4 it is not necessary to specify a branch to Question 4's 'No' response (it is generally recommended that you do not specify a branch if it is not required):-

Display showing Question 4 branching to Question 7 if 'Yes' response

For Question 5 the 'Yes' response will continue to Question 6, but for the 'No' responses we will want them to go straight to the end on the survey as none of the following questions will be applicable. To do this we use the final 'Thank You....' item as the branch:-

Display showing Question 5 'Branch to' set

To avoid those respondents that answered Question 6 being asked Question 7 a 'Jump To' statement pointing to the 'Thank you...' statement would be appropriate.

Display showing Question 6 'Jump to' statement being set to skip to the end of the survey

To hide the branching logic from the dynamic display we can change the 'Preview Pane mode' back to 'Normal':-

Display showing Preview Pane Mode being set to 'Normal'

With the 'Preview Pane Mode' set to 'Normal' the survey display is refreshed with the branching logic now hidden:-

Display showing Preview Pane Mode set to 'Normal'

When Survey Galaxy's automated branching has been used it is not necessary, nor is it advisable, to have any informational 'Go to' instructions included within the survey as the correct branching logic will automatically be followed and if any questions are added, moved or removed from the survey the need to manually change references will be avoided.

The following shows the same survey with branch logic specified but without any of the informational text 'Go to' instructions asking the respondent to skip certain questions, now all the branching logic will be completed automatically based on each respondents actual responses:-

Display showing survey after all informational 'Go to' statements have been removed

Testing

When moving, adding or removing items from a survey that uses branches any resulting invalid branching logic will be ignored.

Using branch logic in your survey will add a level of complexity and it is important that surveys are thoroughly tested to ensure that the branch logic is as intended. You do not need to stop a published survey that has been published to modify the branch logic, you can modify a published survey through the change characteristics facility.

Survey Galaxy makes it easy to create complex surveys and questionnaires.