Defining Cross-validation Rules
Use the Key Flexfield Segments window to define your flexfield structure and segments and specify Yes in the Cross-Validate Multiple Segments field for your flexfield structure.
To define cross-validation rules:
- Select the name and structure of your key flexfield for which you wish to define cross-validation rules. Your list only contains structures with the field Cross-Validate Multiple Segments set to Yes on the Key Flexfield Segments window.
- Enter a unique name and a description for your cross-validation rule.
- Enter your error message text for this cross-validation rule. Your flexfield automatically displays this error message on the message line whenever a new combination of segment values violates your cross-validation rule. You should make your error messages as specific as possible so that your users can correct any errors easily.
- Enter the name of the segment most likely to have caused this cross-validation rule to fail. Your flexfield leaves the cursor in this segment whenever a new segment combination violates this cross-validation rule to indicate where your user can probably correct the error. If you do not specify an error segment name, your flexfield leaves the cursor in the first segment of the flexfield window following a violation of this rule.
- If you want to have the rule effective for a limited time, you can enter a start date and/or an end date for the rule. The rule is valid for the time including the From and To dates.
- Define the cross-validation rule elements that make up your rule. See: Defining Cross-validation Rule Elements.
- Save your changes.
Defining Cross-validation Rule Elements
Use this block to define the cross-validation rule elements that make up your cross-validation rule. You define a cross-validation rule element by specifying a value range that includes both a low and high value for each key segment. A cross-validation rule element applies to all segment values included in the value ranges you specify. You identify each cross-validation rule element as either Include or Exclude, where Include includes all values in the specified ranges, and Exclude excludes all values in the specified ranges. Every rule must have at least one Include rule element, since a rule automatically excludes all values unless you specifically include them. Exclude rule elements override Include rule elements.
Suggestion: We recommend that you define one all-encompassing Include rule element and several restricting Exclude rule elements.
Select the type of cross-validation rule element. Valid types are:
Include Your user can enter any segment value combinations that fall in the following range.
Exclude Your user cannot enter any segment value combinations that fall in the following range.
When you enter the From (low) field, this window automatically displays a window that contains a prompt for each segment in your flexfield structure. You enter both the low and high ends of your value range in this window. After you finish entering your ranges, this zone displays your low segment values in concatenated window in the Low field and displays your high segment values similarly in the High field.
Enter the low end and the high end of your segment combination range. Neither the low nor the high combination has to be a valid key flexfield combination, nor do they need to be made up of valid segment values.
Note that a blank segment value (null value) is considered to fall within a range that has one or both ends specified as a blank. However, if all of your segments require a value, you would not be able to create a combination with a blank segment anyhow.
You may use blank minimum or maximum segment values to create cross-validation rules that can test for blank segments (that are not already required to have a value). For example, if you allow a null value for your last optional segment but not the second-to-last optional segment, you would use a blank minimum or maximum value for the last segment but fill in a value (such as 000 or 999) for both the minimum and maximums for the second-to-last optional segment.
If you want to specify a single combination to include or exclude, enter the same combination in both the Low and High fields.
Disabled rules are ignored when your key flexfield validates a combination of segment values. Deleting the rule has the same effect, but you can re-enable a disabled rule.
Leave a Reply
Want to join the discussion?Feel free to contribute!