Category:Question conditions
Question conditions
Conditions are the rules that we can define to make questions and navigate the questions depending on what respondents have answered in earlier questions or based on the information we already know about them. There are many conditions in the questionnaire.
An example could be that if we know a respondent who does not drink cola, then there will be no reasons asking him the following question on comparing the taste of this cola with Coca-Cola. Instead, we will go directly to a completely different question.
Condition syntax
Mathematical symbols:
Conditions use the mathematical symbols below:
These symbols are explained in the table below:
Expressions:
Consist of Variable, Operator and Constant.
Most expressions have three parts.
- Variable: the data you are comparing with
- Operator: the mathematical symbol used in a comparison
- Constant: the element which the variable is being compared with
For example:
age = = 40
where
age is the variable
= = is the operator
40 is the constant.
Formats of variables
The formats of the variables are quite simple. It is a label’s name of a question.
These labels can easily be entered by selecting one from the question drop down list. If you want to point to a sub-question you must put brackets after the question label with the sub-question number in between, e.g. New_2[2].
Formats of operators
The syntax will be shown somewhat differently in the forms from the display on the buttons. Since it is also possible to enter syntax directly in the forms, it is important to understand the correct format. All formats of operators are shown below.
Formats of Constants
When inserting formats of constants (e.g. age == 40 where 40 is the constant), it is important to put the correct syntax around the constant for the expression to understand it.
When it comes to the answer of a single type question (single and grid-single), you can put the constant in brackets or not:
For example:
- Gender = = [1] or Gender = = 1
When it comes to the answer of a multi type question (multi and grid-multi) you put the constant in brackets. However, if this constant is a range, put these values in brackets:
For example:
- Hobbies = = [1]
- Hobbies = = [1-4]
(meaning Hobbies = = 1 or Hobbies 2 or Hobbies = = 3 or Hobbies = = 4)
- Hobbies = = [1,3-4]
(meaning Hobbies = = 1 or Hobbies = = 3 or Hobbies = = 4)
When it comes to the answer of a numerical question (number, scale, and grid-scale) you need not change the syntax:
For example:
- age = = 40
When it comes to the answer of a text question (text, open and grid-text) you must place double quotes around the constant:
For example:
- name = ="Peter"
The followings are examples of how you can set up ranges.
Validate
Some conditions give the user a validation function. When he uses this function, it will verify whether the syntax of a condition is valid or not. If this condition syntax is valid, the color of the Validate button which is placed on the right of each condition will turn to green. Otherwise, it will turn to red.
Pages in category "Question conditions"
The following 12 pages are in this category, out of 12 total.
C
- Condition name: Exclude answer option from
- Condition name: Exclude answer option if
- Condition name: Exclude sub question if
- Condition name: Go to question if
- Condition name: Goto question and clear if
- Condition name: Include answer option from
- Condition name: Include answer option if
- Condition name: Include sub question if
- Condition name: Show question if
- Condition name: Show question or clear if
- Condition name: Text conditions