Epi Info™ User Guide

Form Designer


How To: Use the Yes-No Field

The Yes-No field is used to collect data with only a Yes or No answer. The field appears as a drop-down list on the canvas. The answer is stored in a database as a 1 or 0 where 1 = Yes and 0 = No. When writing Check Code, use (+) and (–) to indicate yes and no, respectively. Until this field is answered one way or the other, the field’s value is considered to be missing. In Check Code, the missing condition is indicated by the (.) operator. The following figure provides an example of how Yes-No fields appear in Enter (circled in blue) based on the FoodHistory form of the EColi project.

Image showing an example of a Yes-No field in use.

In the Enter module and in the output of analyses, the values for Yes-No fields can be displayed in a variety of ways, or customized for a specific purpose such as in translation to another language. Regardless of how the data are displayed, the values in the database and in exported output are still only 1 or 0.

Yes-No fields can display their data as:

Yes No Missing
True False Unknown
(+) (-) (.)
<custom setting> <custom setting> <custom setting>

To add a Yes-No field:

  1. Open the Yes-No 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 Yes-No Field Definition Dialog box.

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

  1. Click OK. The Yes-No field appears on the canvas.