Defining and editing code lists

If you want some of the fields of a record to use code lists to interpret field values in an entity or link type, you must define the code lists. For example, you may want to interpret a number representing a hair color as the text name of that hair color.

To define or edit a new code list:
  1. Enter a Name for the code list.
  2. Select the type of the code. If you intend to define a code list based on the database, this must be the type of field you will use as the code. If you are creating a text only code list, the type should be left as Text.

    If the code list is already being used by a field, the data type cannot be changed. The database type will also be locked if any manually entered codes are present or if the code list is marked as Value only.

    If the code list is manually entered, the code must be of the correct data type for the code list. If the code list is derived from the database, the data type of the code field must match the code list.

    Note: Code lists do not necessarily have to match the data type of the fields they are used for:
    • a text field can use a code list of any data type
    • any field can use a text code list
    • a field can always use a code list of the same type
  3. As well as providing an interpretation of a field value, you can use code lists to provide the analyst with a list of selected values, for example in the iBridge Find dialog. In this case, you would not have codes and the associated interpretation but instead just text values as the drop-down list options.

    To define a code list with codes and values, select Translated from codes. To define a code list with no codes, select Text from the Type list and select Value list.

  4. You can choose whether to restrict the analyst to selecting only from the list of values in the code list or whether to allow them to type in their own values. If you wish to allow them to type in their own values, turn on Suggestion only.
  5. There may be a code list table in your database which provides an interpretation of field values or you may want to set up your own interpretation here. Select the required option in the Source area.
  6. If you have selected Manually entered in the Source area, enter the code (if required) and the associated text in the grid.

    If the code list information is stored in the database and you have selected From database as the source:

    1. Select the table that contains the code list.
    2. Select the fields containing the codes (if required) and value from the Code and Value lists respectively.

    If the table containing the code list also contains other information, you may need to add a filter. To do this, click on Filter and enter any conditions in the Field Condition dialog. For example, the same database table may contain codes for people's titles and also codes for people's hair color.

    At any time, you can preview the code list data by clicking Preview. The current code list will be displayed.

  7. When you have finished defining the code list, click OK.
    Tip:

    To copy am existing code list, right-click on the code list in the tree view of the Types page and select Copy. Edit the code list as above.