Chapter 3 Building Physical Diagrams
Using a validation rule in check parameters in a PDM
A validation rule is a rule that validates data based on a corresponding business rule. A validation rule can be generated as a check parameter when the following conditions apply:
- Validation rule is attached to a table, column, or domain
- Validation rule is defined as a server expression
At generation, validation rule variables are instantiated with the following values:
Variable
|
Value
|
%COLUMN%
|
Code of the column to which the business rule applies
|
%DOMAIN%
|
Code of the domain to which the business rule applies
|
%TABLE%
|
Code of the table to which the business rule applies
|
%MINMAX%
|
Minimum and maximum values for the column or domain
|
%LISTVAL%
|
List values for the column or domain
|
%RULES%
|
Server validation rules for the column or domain
|
For more information on defining business rules, see chapter Using Business Rules.
To use a validation rule in check parameters:
- Select Model→Tables.
or
Select Model→Domains.
or
Select Model→Columns.
The List of Tables, or List of Domains or List of Columns appears.
- Click a t able in the list.
or
Click a domain in the list.
or
Click a column in the list.
An arrow appears at the beginning of the line.
- Click the Properties tool.
or
Double-click the arrow at the beginning of the line.
A property sheet appears.
- Click the Rules tab.
The Rules page appears.
- Click the Add button.
A list appears displaying the available business rules in the model.
- Select a business rule in the list.
- Click OK in each of the dialog boxes.
Validation rule expressions
You must click the Rules button to modify the expression attached to a validation rule. You can also modify validation rule expressions from the list of business rules, by clicking the Define button.
Copyright (C) 2005. Sybase Inc. All rights reserved.
|
|