Specifying column extended attributes
In addition to adding a comment to associate with a column,
you can specify extended attributes for each column. An extended
attribute is information specific to PowerBuilder that enhances the
definition of the column.
To specify extended attributes
-
Do one of the following:
-
Highlight the column in either the Objects view or the
Object Layout view and select Properties from the Object or
pop-up menu. -
Click the Properties button.
-
Drag and drop the column to the Object Details
view.
-
-
Select a tab and specify extended attribute values:
Select this tab
To modify these extended
attributesGeneral
Column comments.
Headers
Label text used in free-form DataWindow
objects.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. For example, you can
associate a validation rule with a Salary column so that
you can enter a value only within a particular
range.The initial value for the column. 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. -
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.
Overriding 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 PowerBuilder system
tables in the database. PowerBuilder 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 Displaying and Validating
Data.
About headings and
labels
By default, PowerBuilder 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.