Specifying initial values  Specifying the expression

Chapter 21: Displaying and Validating Data

Working with validation rules in the DataWindow painter

Validation rules you assign to a column in the Database painter are used by default when you place the column in a DataWindow object. You can override the validation rule in the DataWindow painter by defining an ad hoc rule for one specific column. You define ad hoc rules in the Column Specification view.

What you do in the DataWindow painter

In the DataWindow painter, you can:

Figure 21-11: Specifying a validation rule in the DataWindow painter

StepsTo specify a validation rule for a column in the DataWindow painter:

  1. In the DataWindow painter, select View>Column Specifications from the menu bar.

    The Column Specification view displays.

  2. Create or modify the validation expression.

    To display the Modify Expression dialog box, right-click the cell under the Validation Expression column that corresponds to the column for which you are creating or modifying a validation rule, and select Expression from the pop-up menu. Follow the directions in “Specifying the expression”.

  3. (Optional) Enter a string or string expression to customize the validation error message.

    To display the Modify Expression dialog box, right-click the cell under the Validation Expression column that corresponds to the column for which you are creating or modifying a validation rule, and select Expression from the pop-up menu. For more information, see “Customizing the error message”.

  4. (Optional) Enter an initial value.

    NoteUsed for current column only If you create a validation rule in the DataWindow painter, it is used only for the current column and is not saved in the extended attribute system tables.





Copyright © 2004. Sybase Inc. All rights reserved. Specifying the expression

View this book as PDF