Epi Info™ User Guide

Form Designer

How To: Use the Comment Legal Field

Comment Legal fields are similar to Legal Values. They are text fields with character(s) typed in front of the text (with a hyphen). During data entry, the character and the text (e.g. M-Male) are displayed. However, only the character value is stored in the table (e.g. M). In the Classic Analysis and Visual Dashboard tools, statistics can be calculated if all values are numeric. The following figure provides an example of how a Comment Legal field appears in Enter (circled in blue) based on the CaseReport form of the Lyme project.

Image showing an example of a Comment Legal field in use.

To add a Comment Legal field:

  1. Open the Comment Legal Field Definition dialog box.
  2. Enter the Question or Prompt. The text entered in this field will display on the canvas and prompt the user to enter a response.
  3. Click in the Field Name text box or press the tab key. Epi Info automatically suggests a field name based on the Question or Prompt, however, it is very important that field names be short, intuitive, and usable. The field name is used for data validation in Check Code and when doing analyses. Field names cannot start with a number or contain any spaces or non-alphanumeric characters (except the underscore character “_” is permitted).

Note: It is best to simplify the field name at this time. Field names cannot be changed after data collection starts.

Image showing the Comment Legal Field Definition Dialog box.
  1. Click the browse button to the right of the Data Source textbox.
  2. Click Create New to enter the available answers for the question.
Image showing the Set Up Codes / Legal Links dialog box.
  1. Enter the first value using the form code-hyphen-comment as in “M-Male” where “M” is the code and “Male” is the comment. Press Enter or Tab to advance to the next value.
  2. Enter additional values using the same code-hyphen-comment format until all necessary items are added to the drop-down list.
  3. Values will appear in alphabetical order unless you select Do Not Sort. This feature displays values in the order in which they are entered.
  4. Click OK.
  5. Existing tables can also be used to create Comment Legal fields.
  • Click Create New from existing (takes a copy of selected table, changes to the original table will not affect the new table) or Use Existing (establishes a connection between the selected table and the new table, any changes made to the original table will modify the new table)
  • Select a table from the drop-down list.
  • Click OK.

For information on other attributes that may be available, see the topic on Field Attributes.

  1. From the Field Definition box, click OK. The new Comment Legal field appears in the form as a drop-down list of values.
Page last reviewed: September 16, 2022, 12:00 pm