You can add basic rule associations for code list attributes. When users add or edit code values in a code list that does not meet the business standards, they receive inline validation errors.
Open a code list.
Click
Definition
.
The
Definition
tab opens.
In the
Attributes
section, select the attribute to add a rule.
The
Attribute Details
panel displays the details of the attribute on the
Details
tab.
On the
Basic Rules
tab, click the
Add
icon.
A form appears.
In the
General
section, enter a unique name for the rule association.
Optionally, enter a description.
To validate and transform inputs fields that are empty, enable
Run
rule association even if all input fields are empty
.
When you add a code value,
the fields configured with rules, such as
Starts With
,
Ends With
,
Contains
,
Date
Range
,
Greater Than Date
,
Less Than
Date
, and
No Future Date
display validation
error messages if the input fields are empty.
On the
Condition
tab, perform the following tasks:
Select a function.
For the input field, select an option from the list.
If you select
Select a Field
, select an attribute from the list.
If you select
Enter a Value
, type a value for validation.
If you select a validation function, on the
Validation
tab, enter an error message or use the default validation message to display when the validation fails.
To verify the created rule, perform the following tasks: