Here are some tips on reviewing a data entry application, including advice on best practices and warnings about common mistakes that people make when creating data entry applications.
- All dictionaries that make up your application should use the same zero fill and decimal character settings. You can check this using Dictionary Analysis.
- Every numeric item should have a value set defining the range of values that can be entered into the field. A common mistake is to not declare a value set for a two-digit age field, but without a value set, ages like -5 can be entered. Although protected fields do not need value sets (because the operator will not enter a value into the field), it is still a good idea to add a value set so that this information about possible values is available to other users of the dictionary. You can use Dictionary Analysis to identify items without a value set.
- For items with multiple value sets, make sure that the primary value set (the first one showing in the dictionary editor) is the value set with the complete list of codes. This value set is used to show labels in the case tree. If the item's value set is defined by cascading options, consider adding a generic value set as the primary value set rather than having one that potentially leads to incorrect labels based on the cascading conditions.
- Ensure that every field's capture type is set to match the way that you want an operator to enter data for the field. As much as possible, prevent an operator from having to enter codes. For numeric fields, text boxes should generally only be used for values like age or currencies; you can use combo boxes for instances when an operator typically will type a value but can occasionally select a discrete code.
- Check for the consistency of field properties. For example, if the upper case setting is used for some fields, it should generally be used for all fields. Field properties can be standardized using the Field Properties (for Multiple Fields) dialog.
- All protected fields must be prefilled with a valid value; if not, CSEntry will terminate data collection. Make sure that all protected fields are filled in via logic or by using PFF parameters.
- If an operator is never going to collect data directly for a given field, consider leaving it off the form. Items in a dictionary can be filled in using logic without needing to exist on a form. Alternatively, you can hide such fields from an operator using the Hide in Case Tree field property.
- Make sure that every question has defined question text. Even for protected fields, it is a good idea, for completeness, to define question text.
- For multiply occurring questions, ensure that the minimum and maximum occurrences defined for a field's question text cover the whole range of occurrences. You can use the Harmonize Occurrences functionality to ensure that the maximum occurrence values match the current dictionary settings.
- Ensure that there is logic to check for acceptable values for fields without value sets. For example, you may want to ensure that operators enter proper alphanumeric responses for fields such as names and other/specifies.
- For alphanumeric text box and checkbox fields, you may want to ensure that a certain number of characters is entered or choices are selected.
- Review all hard checks and soft checks and think about what data respondents will be able to provide. You do not want operators to enter invalid data to bypass a hard check, so use soft checks for questions where some flexibility is allowable.
- When working with dynamic value sets or question text fills that are set via logic, make sure that any logic that is executed for such tasks on a multiply occurring field is in an onfocus, not preproc, event. If the logic is in the preproc, an error can occur as an operator moves backwards to a previous occurrence because the value set and question text will not be updated (because preproc events only occur as an operator moves forwards).
- Verify that fields that should have values are not skipped over. When using system-controlled mode, the values in skipped fields are deleted when a case is finalized. A common mistake is to prefill a field and then skip over it, which results in the data being lost when the case is finalized. In such instances, the field should be prefilled and then protected, which will prevent the operator from modifying the value but ensuring that the data is maintained.
- A best practice is to minimize the use of unnamed constants throughout the application. For example, instead of coding 2020 as a year, declare numeric CensusYear = 2020; and then use CensusYear throughout the application. This makes the code clearer and also makes it easier to change your application when circumstances change.