Introduction to PowerBuilder

HomePrevious Lesson: Column Attributes
Next Lesson: Format Styles

Extended Attributes

Though the allowed value for each attribute differs from database to database, all databases support the attributes explained previously. PowerBuilder supports few more attributes called Extended Attributes that are not part of the standard table definition. PowerBuilder stores all the extended attribute definitions in PowerBuilder specific system tables in the connected database. To specify extended attributes, double-click on the column/table name to which you want to specify.

Going back one step, whenever you connect to a database for the first time, PowerBuilder creates five tables namely "Pbcatcol", "pbcatedt", "pbcatfmt", "pbcattbl" and "pbcatvld". PowerBuilder manages and stores all the extended attributes in these tables.

What are extended attributes? They define:

The following table illustrates the extended attributes with a description of their usage:

Attribute

Description

Format

Used to alter the format of the data when it is displayed. An example of a widely used format style would be the alteration of European date format to the US style of presentation.

Edit

Used to specify an edit mask for a column. An edit mask allows you to define a template to format the data in a pre-defined manner.

Valid

This can be used to specify a validation rule for the data; something like, all numbers must be less than 31.

Justify

You can specify left, right or center justified text.

Height

Used to specify the height of the box that displays the data.

Width

Used to specify the width of the box that displays the data.

Header

Specifies a header for the column that is different from the field name. It is used in Tabular and similar presentation style DataWindows.

Initial

You can specify a default value for the column. An example would be to insert today's date if the user left the field blank.

Label

You can specify a label for the column that is different from the column name. It is used in Freeform and similar presentation style windows.

Comment

In this attribute, you can add comments for the column.

PowerBuilder will automatically fills in Header and Label text using the column name, replacing underscore characters with spaces and capitalizing the first letter of each word.
HomePrevious Lesson: Column Attributes
Next Lesson: Format Styles