Category:Question conditions

From Catglobe Wiki
(Redirected from Question conditions)
Jump to: navigation, search



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:

Conditions 1

These symbols are explained in the table below:

Conditions 2

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.

Conditions 3

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.

Conditions 4

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.

Conditions 5

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.