Cross-Validation Rules

You can define cross-validation rules across segments to control the creation of key flexfield code combinations. These rules enforce whether a value of a particular segment can be combined with specific values of other segments to form a new combination.

The following table compares segment validation to cross-segment validation:

Type of validation

Type of control

Segment validation

Controls the values you can enter for a particular segment

Cross-segment validation

Controls the combinations of values that administrators and end users can create for key flexfields

Note: You can use cross-validation rules for any key flexfield that has cross-validation enabled. See the documentation for your key flexfield to determine if it supports cross validation.

Cross-validation rules prevent the creation of combinations with values that can't coexist in the same combination. For example, your company requires that all revenue accounts must have a specific department. Therefore, account combinations that have revenue account values, such as all values between 4000 and 5999, must have a corresponding department value other than 000, which indicates no department is specified. You can define cross-validation rules that disallow creation of combinations with incompatible segments, such as 4100-000 or 5000-000.

Alternatively, suppose your accounting key flexfield has an Organization segment with two possible values, 01 and 02. You also have a Natural Account segment with many possible values, but company policy requires that Organization 01 uses the natural account values 001 to 499 and Organization 02 uses the natural account values 500 to 999. You can create cross-validation rules to ensure that users can't create a general ledger account with combinations of values such as 02-342 or 01-750.

The following aspects are important to understanding cross-validation rules:

  • Rule Definitions

  • Enforcement

  • Timing

Rule Definitions

The following table contains definitions used in cross-validation rules:

Rule Definition

Purpose

Name

Uniquely identifies cross-validation rules in a deployment.

Description

Helps administrators identify the purpose of the rule.

Error message

Explains why the attempted combination violates the rule.

Start Date, End Date

Indicates the period of time when the rule is in effect.

Enabled

Determines whether the rule is enforced.

Condition filter

Determines the conditions in which an enabled cross-validation rule should be evaluated.

Validation filter

Determines the validation that the rule enforces when that condition is met.

When the event specified in the condition filter is applicable, the validation filter condition must be satisfied before the combination can be created. If the event specified in the condition filter isn't applicable, then the combination is considered to pass the rule and the rule won't be evaluated even if it's enabled.

Note: If you don't specify any statement in the condition filter, then the condition is always true and the rule is always evaluated.

Enforcement

Cross-validation prevents creation of invalid combinations by administrators using maintenance pages and end users using dynamic insertion in foreign key pages.

Enabled rules are enforced when there is an attempt to create a new combination of segment values. Disabled rules are ignored. Deleting the rule has the same effect, but you can re-enable a disabled rule.

Timing

When users attempt to create a new combination, the key flexfield evaluates any cross-validation rules that are enabled and in effect.

Note: Cross-validation rules have no effect on combinations that already exist. The flexfield treats any existing invalid combinations that pre-date the rule as valid.

If you want to prevent users from using previously existing combinations that are no longer valid according to your cross-validation rules, manually disable those combinations using the combinations page for that key flexfield.

When defining a cross-validation rule, specify a start and end date to limit the time when the rule is in effect. The rule is valid for the time including the From and To dates.