Conditional Coding Rules Overview
The Conditional Coding Rules application facilitates the creation of layout validation rules using a modern, intuitive interface. This application uses a pre-save event handler that performs validation when the user clicks the Save button on a layout. If the rule blocks the save action, a message will display at the top of the layout. This validation occurs before Relativity writes any data to the database.
Conditional Coding Rules only supports validating layouts associated with the Document object or Relativity Dynamic Objects (RDOs). It does not support validation on any system objects.
You will define the rules that are considered invalid when the user is coding fields within a layout. The following list outlines important concepts necessary for constructing these coding rules.
- Basic Information—define the rule name, which Object Type it applies to, and optionally which layout. The Enabled toggle determines whether this rule is active in the workspace. If no layout(s) are selected, the rule will affect all layouts on the object.
- Condition—the validation rule. This defines the invalid data or scenario that is not allowed. You build conditions by performing these tasks:
- Identifying a validation type (field or user validation).
- Selecting a field or group name and an operator for evaluation purposes.
- Choosing a choice or value.
- Action—the message shown to the user when the conditions are met and their attempt to save the layout data is not permitted. It should instruct them which field(s) are set incorrectly or which group they should or should not be a member of.
For example, you may have a layout that includes fields called Responsive and Issue Designation. You could add a condition that results in an error message when the user selects true for the Responsive field but hasn't selected an option for the Issue Designation field.
Conditional Coding Rules supports five field types: Long Text, Fixed-length Text, Single Choice, Multiple Choice, and Yes/No fields. You can use only the supported operators for each field type when building an event handler. If you add multiple conditions, you can choose to evaluate them as a series of expressions connected by the AND or OR operators. See Creating Conditional Coding Rules.
In addition to these key concepts, review the following functionality that characterizes the coding rule behavior:
- Triggered only for updates to a single record—Your coding rule executes when a user clicks Save, Save & Next, or Save and Back. They are not executed on mass operations.
- Read-only fields and propagation—Propagation does not occur when a field populated by an event handler condition is set to Read Only=Yes and propagation is enabled on the field.
- Not retroactive—The conditions that you define in your coding rule only apply to coding that occurs after you activate the rule's Enabled toggle on the rule itself within the workspace. You must re-code previously reviewed documents for the validation to take effect.