The general flow of a survey calls for showing the survey questions one by one (or page by page) until the end of the survey is reached:

General flow of survey, for single-question-per-page

The flow of a survey can be manipulated to behave differently then the general flow. To control the flow of the survey, you can use rules. The rules model supported in SurveyToGo is composed of:

Entrance Rule

The entrance rule controls whether or not the question will be visible (entered) in the survey. The entrance rule is composed out of an expression that is evaluated during the course of the survey. If the expression evaluates to true, the question is shown, otherwise, the question is not shown. An empty entrance rule is treated as a true expression and the question is shown.

The entrance rule can be written for either questions or chapters and act the same way. If a chapter entrance rule equals to false, the whole chapter is not shown, including all of its questions.

Writing the entrance rule

You can either build an entrance rule with the help of the Entrance Rule Wizard, or choose to write the entrance rule yourself. Using the wizard has some limitations which are not present when writing the rule without the wizard. It will prove extremely worthwhile to learn to write rules without the wizard.

To use the wizard, simply click the “Create Rule” link:

You will be then led by a series of questions where you specify the entrance rule properties:

To write an entrance rule to a question, switch to the rules tab of the question details pane, and write the entrance rule in the top text box:

The entrance rule can be a simple statement, however, you can also write extremely advanced and complicated entrance rules. The entrance rule is virtually unlimited in terms of flexibility. To learn more about the actual syntax for writing rules please see Chapter 7.

Validation Rules

To clarify the role of validation rules lets consider the following survey for an example of the need for validation rules:

[Question 1]: “How many people are in your car?”

[Question 2]: “of those, how many are your best friends?”

It is very obvious that if one answers 4 to the first question, he cannot answer more then this to the second question. We have a need to check the validity of the second answer in relation to the first answer. This is where validation rules come in handy.

The validation rule controls whether the answer to the question is valid. The validation rule is composed of a condition and a validation message. The condition is evaluated during the course of the survey. If the condition evaluates to true, the survey will not continue and the associated validation message will be shown next to the question.

In our example, we will add this validation rule to question 2:

[condition] Answer to this question > Answer to the first question?

[message] “Number of Best friends in the car cannot be more then passengers!”

If we add this validation rule to question 2, when reached SurveyToGo will check the condition, and if it is true, the message will be shown and the survey will not continue to the next question.

Writing validation rules

To add one or more validation rules to a question, switch to the rules tab of the question details pane, and use the validation rules section listbox:

Click the “Add” icon to add a new validation rule and a validation message. You can add more then one validation rule.

Jump Rules

The jump rule controls what action will be taken after the subject answers a specified question. Jump rules are composed out of a condition and an action. After the question is answered, the question jump rules are evaluated. If a jump rule’s condition evaluates to true, the specified action will take place. Actions include:

Action

Description

Cancel

Cancel the survey. The current results are lost.

Filter

Filter-out the subject. The result will contain the current question in the Filter column if the “Include Filtered out Subjects” option is selected in the export options.

Go to index

Jumps directly to the question that is specified as the “Target”.

Next

Continues to the next question. This is the default flow of the survey.

Submit

Submits the current survey without reaching the end of the survey.

Go to Chapter

Jumps directly to the chapter that is specified as the “Target”.

Writing jump rules

To add one or more jump rules to a question, switch to the rules tab of the question details pane, and use the jump rules section list box:

Click the “Add” icon to add a new jump rule and action. You can add more than one jump rule to each question.