UCL WIKI

UCL Logo
Page tree

Versions Compared

Key

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

...

The label should be in the format c_q[questionref], for example c_q18. The condition label contains a collapsed version of the question label it references. That is, any underscores which are in the question label are removed from the condition label in order to distinguish between the question number and the condition number. For example if a condition was labelled c_q14_ii it would not be able to tell if this refers to question 14_ii or whether it is the second condition from question 14. If it was referring to question 14_ii then the condition label would be c_q14ii. See Construct a Label for more on how to name conditions.

 


The following list details the examples which are included within this wiki page.

...

Archivist view (nshd_69_pq):

 

 


In rare cases, a question can include an answer option in the code list that indicates that the question may not be applicable to some respondents. And therefore it would be skipped. A condition, although implied, is not given in the questionnaire. A separate question is constructed using the answer option which indicates the next questions will not be answered. In Example 7 below, a condition is constructed using text from this answer option 'if we are never apart'. The true branch of the condition is left empty and the main (original) question is placed in the false branch.

...

Example 11 Questionnaire: ALSPAC Child’s Behaviour and Abilities

Questionnaire layout:


 


Archivist view (alspac_99_cba):

 


A more complicated condition in terms of grid logic is shown in Example 12 below. In this case, only some of the answer responses in the grid are applicable (marked with an *) for the condition to be true. Therefore, the condition logic only references these specific grid cells. See Table 2. Grid Coordinates for more details.

...

It is possible to have a condition which does not relate to a question. This is common in the introduction to a questionnaire. In Example 13 below, there is no previous question that the condition can be based on such as: 'Has the child diedAre you in full-time work?'. In this case, Therefore there is no condition logic to be entered and the square brackets will appear empty in the Archivist doc view.

As there is no question to reference, the condition label is labelled after the first question that is dependent on that condition in this case qc_51e. See Construct a Label for more on how to name conditions.

Example 13 Questionnaire: NSHD

...

Main Questionnaire 1989

Questionnaire layout:

Image RemovedImage Added

Archivist view (nshd_5289_iwmmq):

Image RemovedImage Added


Anchor
Ranges
Ranges
Using ranges in condition logic

...

Archivist view (alspac_04_pal):

 


Anchor
Condition Notation
Condition Notation

Tip
iconfalse
titleTable 1. Condition Notation

Comparisons

==

Is equal to

!=

Is NOT equal to

Less than

Greater than

Joining

&&

To join two comparisons using an AND

||

To join two comparisons using an OR

Qualifiers

‘ (single quote)

Meta value (numeric)

“ (double quote)

Literal string

 

 

(text)



Anchor
Grid Coordinates
Grid Coordinates

Tip
borderWidth= 500.0px;
iconfalse
titleTable 2

Grid coordinates

$X;Y

Used to specify a cell or multiple cells of a grid


qc_example$3;2


 

Example

Col 1

Col 2

Col 3

Row 1

 

 

 




Row 2

 

 

 




Row 3

 

 

 

 





qc_example$2;*


 

Example

Col 1

Col 2

Col 3

Row 1

 

 

 




Row 2

 

 

 




Row 3

 

 

 

 





qc_example$*;1


 

Example

Col 1

Col 2

Col 3

Row 1

 

 

 




Row 2

 

 

 




Row 3

 

 

 

 





qc_example


 

Example

Col 1

Col 2

Col 3

Row 1

 

 

 




Row 2

 

 

 




Row 3

 

 

 

 





qc_example$2:3;*

Example

Col 1

Col 2

Col 3

Row 1

 

 

 




Row 2

 

 

 




Row 3

 

 

 

 





qc_example$1,3;*

Example

Col 1

Col 2

Col 3

Row 1

 

 

 




Row 2

 

 

 




Row 3