UCL Logo
Page tree
Skip to end of metadata
Go to start of metadata

This page is still under construction.

Key Considerations

  • A Code list is re-usable, but only if the categories and code values match exactly. So ‘1-Yes, 2-No’ is different to ‘1-Yes, 0-No’. Likewise 1-Yes, 2-No is different to 1-yes, 2-no.
  • Code lists used to input X and Y axis labels in grids are not response domains.

Code lists are used for two purposes when documenting a questionnaire:

  • To create a response domain answer when a question asks the respondent to choose from a defined list of responses
  • To create row and column labels required for a question grid

For both question answers and grid axis labels, the code list generally consists of multiple categories, each of which is assigned a unique code value. A category is a single answer option within a set of multiple-choice options. Occasionally a code list may consist of a single code value and single category. (Add single category examples) [Link] Code list categories can be just a number. (Add just number Y axis example) A code list can also contain a mix of numbers and text categories.(Add scale example)

Code lists used as an answer to a question are response domains. The Response Domain box on the input page must be ticked when creating the code list in order for the code list to be available as an answer when creating a question item or question grid.

Code lists used to create row and column labels for grids are not response domains. Do not tick the response domain box when creating these types of code lists.

Code lists are reusable, therefore when a questionnaire contains multiple questions with the same response choices, or grids with the same row and column labels, only one code list is created and is used repeatedly as a response domain or axis label where appropriate.

Note: For a code list to be reusable, both the code values and category texts must match exactly, including capitalisation and punctuation. So the question responses of ‘1 Yes, 2 No’;  ‘1 Yes, 0 No’; and ‘1 yes, 2 no’ are all different and require separate code list response domains.

Code list label construction

Code list labels start with the prefix cs_. The question reference portion of the label is not collapsed. 

Code lists that are answers for a single question refer to the question number in their label. A ‘q’ is added before the start of the question reference portion of the label. So the code list label for question ‘A3 a’ would be cs_qA3_a. 

The IDs for code lists that are answers for multiple questions refer to the categories that make up the code list. The label is made up of the initials of the words in each category with an underscore separating the categories in the code list. So for a multiple use code list consisting of the categories ‘All of the time, Some of the time, Hardly ever, Never’ the code list label would be cs_Aott_Sott_He_N. 

Note: Exceptionally to the protocol above, the categories of ‘yes’ and ‘no’ are always spelled out when they are contained in a multiple use code list. So for a code list containing ‘Yes, No, Don’t know’ the label would be cs_Yes_No_Dk’. 

Code lists for labelling the X (column) and Y (row) axes in grids usually contain a reference to the grid axis the code list creates. For example, for grid question A4 (qc_A4), the label for the Y axis code list would be cs_qA4_Y, and the label for the X axis code list would be cs_qA4_X. The code list labelled cs_dash (containing the single category of '-') is used as the X axis code list for all grids with a single column with no heading label (see Question Grids for more details). When a grid has a corner label, the code list label for either the X or Y axis is the corner label text with the cs_ prefix (see Question Grids for more details). See   How to Construct a label for further guidance.

Assigning code values

If a question response contains code values for the categories, these values are used in the code list. The code value may be a letter, number or symbol (*) and the values may or may not be sequential. (Add symbol and non-sequential examples)

If a question does not contain code values for the response domain categories, a numeric code value is entered sequentially for the categories, starting with ‘1’.

Code values for categories that are just a number mirror the number. (reference examples again?)

Code lists for labels for ‘X’ and ‘Y’ axes in grids also require code values. These are assigned sequentially, and are always numeric (starting with ‘1’), even if there are letter designations in the questionnaire for the row or column labels.


In addition to code list categories and their code values, cardinality must be added when creating a code list. Cardinality places a constraint on the number of times an entity can appear in a relationship, i.e. whether a respondent can chose only one answer from a code list (1:1 relationship) or all that apply (1:n or 0:n relationship). For most code lists the cardinality is 1:1 and this is the default when creating a code list.

In a ‘Tick all that apply’ answer, if a respondent doesn’t need to choose a category, cardinality is 0:n, with n the total number of categories the respondent can choose. If a ‘Tick all that apply’ code list contains the category ‘None of the above’ or similar, or is within a condition which assumes that there is an answer, the cardinality is 1:n, with n the total number of categories the respondent can choose, not counting the ‘None of the above’ category. (Examples to be added)


There are two types of scale response domain which can be found in questionnaires, those which have discrete points which the respondent can select, and those which are a line which the respondent marks. The former are entered as a code list, the latter are yet to be entered into Archivist. Example 1 below shows a question where a code list is used as the response domain to represent the scale.

Example 1 Questionnaire: NCDS What do you think 1991

Questionnaire layout:

Archivist Build / Code lists view:

Archivist view: (ncds_91_wdyt)

Concatenating categories

Sometimes it is necessary to concatenate code list category text into one category. This could be because extra information is provided along the side of the code list, e.g. Example 2, or it could be because there are headings to the categories, e.g. Example 3. Example 2 has additional text to the side of the code list which applies to certain categories. If this was added as a statement then it would not be clear which categories this text applies to, therefore the text is added the code list categories. The order of this concatenation is dependent on the position of the text next to the categories, in this case the text is positioned before the categories and so it is added before. A colon is added in between to denote the two levels. Example 3 below has code list categories which are divided up by headings which apply to some of the categories, again these must be concatenated to the category with a colon to denote the levels.

Example 2 Questionnaire: NCDS Interview 1981

Questionnaire layout:

Archivist view: (ncds_8_i)


Example 3 Questionnaire: USoc Youth Self-Completion 2009

Questionnaire layout:

Archivist view: (us1_ysc)

  • No labels