Each category item contains a unique code and a descriptive value. You can enter these directly or you can load codes and values from a file or database.
The category code is the unique identifier for the option. Category codes must be unique within the question (but you can use the same category code in a different question).
The code can be a number or text, but if it is text it must:
begin with a letter
contain only letters, numbers and the underscore character
A category code can be the same as its value, but it must not be the same as any other category value for the question. When answering a category question that displays as a drop down list, the data entry user can type the code or value into the question field. The response is checked firstly against the code and secondly against the value. So if the question contains a value that matches the code of another item and the user enters the value, the code of the other item will be selected instead.
We advise against using category codes with leading zeroes (e.g. 01, 02) as Arezzo expressions may not work as expected when referring to these code values.
When creating the category options male and female, we recommend that you use the standard codes which are 1 for female and 2 for male. See example

When writing Arezzo expressions which refer to category questions, you must always use the category code to refer to the question options, for example
initinten = 2
The category value is the descriptive text for the option and is entered as free text. When the category question is displayed as option buttons or option boxes, it is only the category values which are shown. When the question is displayed as a drop down list, you have the option of displaying just the values or both the values and the codes. This is set in the Display Code & Value field within the eForm definition window.
A category value can be the same as its code, but it must not be the same as any other category code.
You can use the same category value more than once in a question, but this may be confusing for the data entry user, and can lead to incorrect options being selected.
Changing a category value in a study where data has already been entered for that category question is not recommended as it will cause the following data inconsistencies:
The only way to convert saved responses from old category values to new category values is to delete each category response, save the eForm, and then re-enter each response.
When deriving the value of a category question, the derivation expression must specify the text value rather than the code value. More information...
Click in the Active column to ensure that the category option is displayed. When the Active column is not selected, the option will not be displayed to the data entry user. You can use this feature to hide category values if they are no longer appropriate within a study, because once subjects have been recruited onto a study, you are not allowed to delete category values.
You have control over the order in which the category options appear to the data entry user. Use the drop down list to select the order you prefer. It is advisable to set the sorting order after you have finished entering options as when you add a new option, the sort order will revert to 'No Sorting'. This also happens when you change the order manually.
No Sorting |
Options will be displayed in the order that they have been entered in the Values tab. You can change the order manually by clicking in the grey area to the left of a value and dragging it up or down to the required position. |
Sort on Code (ASC) |
Options will be sorted by code in ascending order (0123456789ABC...) |
Sort on Code (DESC) |
Options will be sorted by code in descending order (ZYXWV...) |
Sort on Description (ASC) |
Options will be sorted by description in ascending order (0123456789ABC...) |
Sort on Description (DESC) |
Options will be sorted by description in descending order (ZYXWV...) |
You can load codes and values from an external file or from a database. When you do this, the loaded categories will replace all the existing categories for this question.
Select the Text File option, click the Load button, and select an appropriate file from the Windows file dialog. The file must contain comma separated pairs of codes and values (normally a .csv file) which conform to the rules given above for category codes and values. See example
AD,Andorra
AE,United Arab Emirates
AF,Afghanistan
AG,Antigua and Barbuda
AI,Anguilla
AL,Albania
AM,Armenia
AN,Netherlands Antilles
AO,Angola
AQ,Antarctica
AR,Argentina
AS,American Samoa
AT,Austria
AU,Australia
AW,Aruba
AZ,Azerbaijan
BA,Bosnia and Herzegovina
BB,Barbados
BD,Bangladesh
BE,Belgium
BF,Burkina Faso
BG,Bulgaria
BH,Bahrain
BI,Burundi
BJ,Benin
BM,Bermuda
BN,Brunei Darussalam
BO,Bolivia
BR,Brazil
BS,Bahamas
BT,Bhutan
BV,Bouvet Island
BW,Botswana
BY,Belarus
BZ,Belize
If you select the ADO-Default connection, information will be retrieved from the current database.
If you select an ADO-Access or ADO-SQL Server database connection, you will be asked to provide the database connection details.
You must then enter the relevant SQL query in the Data Source field, which should be a SELECT statement which retrieves pairs of codes and values. (To avoid unintentional writes to the database, you may only enter SQL statements which begin with SELECT.)
Note: You should not remove category values from question definitions once the study has been opened for subject data entry.