UCL Logo
Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


The set of condition logic is based on Boolean operators (OR, AND, NOT) used in programming or database searching. These operators, particularly OR and AND, are used to combine pieces of condition logic code. The symbols || and && are used to denote OR and AND, respectively. See Example 5 above. Condition logic is placed within square brackets adjacent to the condition text. In Example 3 above, [qc_A3_a == 1] describes that the respondent should advance to the true branch if they responded with code list value 1 to question qc_A3_a.

The answer giving rise to a condition can be a code list value, numeric answer or a text answer. Most condition logic refers to a code list value from a previous question. The corresponding code value is used without any quotations as seen in Example 3. For numeric answers single quotations are used (see Example 9 below) and for text or date answers double quotation marks are used (see example 10 and example 17). Table 1. Condition Notation provides a summary.


Archivist view (ncds_69_eq):


Example 10 Questionnaire: NCDS Parental Questionnaire 1974

Questionnaire layout:

Archivist view (ncds_74_pq):