Criteria define the records to be targeted by a basic selection rule. By adding criteria to a basic selection rule you limit the records to be counted when the rule is run. For example, adding a ‘Gender is female’ criterion causes only female records to be counted.
A dark border is displayed at a criterion when it is when selected.
Provision of criteria is optional. If you get a basic selection rule's count with no criteria specified, a count of all records at the SQL database definition’s resolution is returned.
When adding a criterion from a child table within the SQL database definition, if adding the criterion at the level of the basic selection rule itself, a parent criteria list is created automatically, and the new criteria created within. If a criteria list matching the level of the nested criterion is selected at its creation, the new criterion is added within the criteria list. If a criteria list with a level other than the new criterion's level is selected at the criterion's creation, a warning is thrown.
A validation error is raised if the attribute on which the criterion is based cannot be located in the currently-selected definition (this may occur if, for example, you change the definition after a criterion has been added).
You can re-order read-only criteria within a basic selection rule using drag and drop. If you attempt to drag a criterion into an incompatible parent criteria list, a message is displayed to advise that you are unable to do so.
You can also drag and drop criteria between basic selection rules. Drag and drop is not supported at criteria when in edit mode.
Criteria can be presented in either read-only or edit mode. Only a single criterion can be displayed in edit mode at a time.
When in read-only mode, the following are shown at a criterion:
• Resolution level icon
• Plain text interpretation of settings: consisting of the criterion name, operator and any specified values, e.g.:
• Configure: clicking this button puts the criterion into edit mode.
• Actions: clicking this button displays a context menu, which exposes the following:
o Cut
o Copy
o Remove: removes the criterion without displaying an 'Are You Sure?' dialog.
Note that the same context menu is shown when right-clicking a criterion.
When in edit mode, the following are shown:
• Textual criterion description.
• Operator: a dropdown field, the values exposed by which are data type-appropriate.
• Value(s): the values supported at a criterion are appropriate for its data type. If a criterion supports the provision of values, the following is initially displayed at its value:
If predefined values are not supported, values are supplied using the Specify Values dialog. More information on the Specify Values dialog can also be found in the RPI Framework documentation.
o If a numeric criterion type, a masked field restricts data entry to a numeric value. If one of the ‘Is in list’ or ‘Is not in list’ operators is selected, multiple values can be supplied using the Specify values dialog (see above for details).
o If a date criterion type, display depends on the selected operator.
§ If ‘Equals’ or ‘Does not equal’, the following are shown:
A date or datetime picker, defaulting to today/now, is shown. Selecting the button to its right sets the value to the Current date/time.
§ If ‘After’, ‘Before’ or ‘Within’, the following are shown:
§ If ‘Is’, the following are shown:
Note that if set, values are calculated using the time zone specified in system configuration setting RuleTimezoneOverride. If blank, the server time zone is used.
o If a Boolean decision criterion type, the following values are available:
§ Is True
§ Is False (the default)
Note that if an Exists or Does not exist operator has been selected, Value is not shown.
• Done: clicking this button returns the criterion to read-only mode.
The following keyboard shortcuts are supported at read-only criteria:
o Ctrl-C: copy
o Ctrl-X: cut
o Delete: remove
Please note the following:
• You can get a basic selection rule's count when one or more criteria are in edit mode.
• You can put a read-only criterion into edit mode by double-clicking it.