Sybase 2 Barcode Reader User Manual


 
CHAPTER 8 Displaying and Validating Data
DataWindow Designer User’s Guide 263
The
Sales table has two columns, Price and Commission. The validation rule for
the
Commission column is:
(Number(GetText( )) >= If(price >= 1000, .10, .04))
AND
(Number(GetText( )) <= If(price >= 1000, .20, .09))
A customized error message for the Commission column is:
"Price is " + if(price >= 1000,
"greater than or equal to","less than") +
" 1000. Commission must be between " +
If(price >= 1000,".10", ".04") + " and " +
If(price >= 1000, ".20.", ".09.")
How to maintain extended attributes
DataWindow Designer provides facilities you can use to create, modify, and
delete display formats, edit styles, and validation rules independently of their
association with columns. The following procedure summarizes how you do
this.
To maintain display formats, edit styles, and validation rules:
1 Open the Database painter.
2 Select View>Extended Attributes.
The Extended Attributes view displays listing all the entities in the
extended attribute system tables.
3 Do one of the following:
To create a new entity, display the pop-up menu for the type you want
to add, then select New.
To modify an entity, display its pop-up menu, then select Properties.
To delete an entity, display its pop-up menu, then select Delete.
Caution
If you delete a display format, edit style, or validation rule, it is removed
from the extended attribute system tables. Columns in the database are no
longer associated with the entity.