Specifying table properties  Specifying additional properties for character columns

Chapter 16: Managing the Database

Specifying column extended attributes

Besides adding a comment to associate with a column, you can specify extended attributes for each column. An extended attribute is information specific to PocketBuilder that enhances the definition of the column.

StepsTo specify extended attributes:

  1. Do one of the following:

  2. Select a tab and specify extended attribute values:

    Select this tab

    To modify these extended attributes

    General

    Column comments.

    Headers

    Label text used in freeform DataWindow objects and header text used in tabular, grid, or n-up DataWindow objects.

    Display

    How the data is formatted in a DataWindow object as well as display height, width, and position.

    For example, you can associate a display format with a Revenue column so that its data displays with a leading dollar sign and negative numbers display in parentheses.

    Validation

    Criteria that a value must pass to be accepted in a DataWindow object and as an initial value for the column.

    For example, you can associate a validation rule with a Salary column so that users can enter only a value within a particular range. For the initial value, you can select a value from the drop-down list. The initial value must be the same datatype as the column, must pass validation, and can be NULL only if NULL is allowed for the column.

    Edit Style

    How the column is presented in a DataWindow object.

    For example, you can display column values as radio buttons or in a drop-down list.

  3. Right-click on the Column property sheet and select Save Changes from the pop-up menu.

    Any changes you made in the property sheet are immediately saved to the table definition.

NoteOverriding definitions In the DataWindow painter, you can override the extended attributes specified in the Database painter for a particular DataWindow object.

How the information is stored

Extended attributes are stored in the PocketBuilder system tables in the database. PocketBuilder uses the information to display, present, and validate data in the Database painter and in DataWindow objects. When you create a view in the Database painter, the extended attributes of the table columns used in the view are used by default.

About display formats, edit styles, and validation rules

In the Database painter, you create display formats, edit styles, and validation rules. Whatever you create is then available for use with columns in tables in the database. You can see all the display formats, edit styles, and validation rules defined for the database in the Extended Attributes view.

For more information about defining, maintaining, and using these extended attributes, see Chapter 21, “Displaying and Validating Data.”

About headings and labels

By default, PocketBuilder uses the column names as labels and headings, replacing any underscore characters with spaces and capitalizing each word in the name. For example, the default heading for the column Dept_name is Dept Name. To define multiple-line headings, press Ctrl+Enter to begin a new line.





Copyright © 2004. Sybase Inc. All rights reserved. Specifying additional properties for character columns

View this book as PDF