Epi Info™ User Guide
Check Commands: AutoSearch
AUTOSEARCH causes Enter to search for records with values in the specified fields that match ones in the current record. If a match is found, it can be displayed, edited, or ignored, and the current record can continue to be entered.
- The <field(s)> represents one or more fields to search.
The results are displayed as a spreadsheet. If you have more records than can be viewed in a single screen, a scroll bar appears to the right of the spreadsheet. Use the mouse to see the additional matched records.
To quickly navigate to one of the matched records returned, double-click the intended row. Alternatively, move the cursor to the desired row and press Enter or click OK. Navigating to a matched record will discard any data entered to the new record. All fields will show data from the selected record. The record number indicator at the lower left will show the record number of the selected record. To avoid selecting any of the matched records, press Esc or click Cancel to return to the current new record. Data entry will continue for the new record.
Fields displayed from a search are determined as follows:
- If a single field is the key field, it will be displayed with as many other fields as possible.
- Multiple key fields (if any) will be displayed before any others.
The AUTOSEARCH command is used to find duplicate entries during data entry. In this example, duplicates are identified by a matching first and last name as in a name-based registry system. The example assumes a form exists with the following fields: FirstName (Text) and LastName (Text). The code below would appear in the AFTER section of the second field to be filled in by the user.
AUTOSEARCH FirstName LastName
Note: When searching on multiple fields, put the AUTOSEARCH command in Check Code for a field after all the key values have been entered. In the example above, both FirstName and LastName are key fields and LastName is the last of the key fields to be entered. The AUTOSEARCH command should appear in the Check Code for LastName.