Define Single-Variable Rules
The Single-Variable Rules tab allows you to create, view, and modify single-variable validation rules.
Rules. The list shows single-variable validation rules by name and the type of variable to which the rule can be applied. When the dialog box is opened, it shows rules defined in the data dictionary or, if no rules are currently defined, a placeholder rule called "Single-Variable Rule 1." The following buttons appear below the Rules list:
- New. Adds a new entry to the bottom of the Rules list. The rule is selected and assigned the name "SingleVarRule n," where n is an integer so that the new rule's name is unique among single-variable and cross-variable rules.
- Duplicate. Adds a copy of the selected rule to the bottom of the Rules list. The rule name is adjusted so that it is unique among single-variable and cross-variable rules. For example, if you duplicate "SingleVarRule 1," the name of the first duplicate rule would be "Copy of SingleVarRule 1," the second would be "Copy (2) of SingleVarRule 1," and so on.
- Delete. Deletes the selected rule.
Rule Definition. These controls allow you to view and set properties for a selected rule.
- Name. The name of the rule must be unique among single-variable and cross-variable rules.
- Type. This is the type of variable to which the rule can be applied. Select from Numeric, String, and Date.
- Format. This allows you to select the date format for rules that can be applied to date variables.
Valid Values. You can specify the valid values either as a range or a list of
Range definition controls allow you to specify a valid range. Values outside the range are flagged as invalid.
To specify a range, enter the minimum or maximum values, or both. The check box controls allow you to flag unlabeled and non-integer values within the range.
List definition controls allow you to define a list of valid values. Values not included in the list are flagged as invalid.
Enter list values in the grid. The check box determines whether case matters when string data values are checked against the list of acceptable values.
- Allow user-missing values. Controls whether user-missing values are flagged as invalid.
- Allow system-missing values. Controls whether system-missing values are flagged as invalid. This does not apply to string rule types.
- Allow blank values. Controls whether blank (that is, completely empty) string values are flagged as invalid. This does not apply to nonstring rule types.