Previous | Table of Contents | Next

Page 350

Table 14.3 Continued

Property Name Description
databases. Unique is the default value and causes Forms to use ROWID constructs to identify unique rows in an Oracle database. Updateable causes Forms to use update statements that include the primary key values. Non-Updateable causes Forms to not include the primary key columns in any update statement.
Locking Mode Tells Forms when to obtain database locks on rows that correspond to queried records in the form. The Immediate setting causes Forms to obtain the lock when the operator modifies the row. The Delayed setting causes Forms to wait for the lock until the transaction is about to be committed.
Name The name of the block.
Navigation Style Determines the navigation method. The property has three values: Same Record, Change Record, and Change Block.The Same Record property is the default. This setting will cause the form to return the cursor to the first item in the record after tabbing from the last item in the record. The Change Record setting causes the cursor to move to the next record in the block after tabbing from the last item on the current record. The Change Block setting causes the cursor to move to the first record in the next block after tabbing from the last item in the record.
Next Navigation Block Determines the next block the form will navigate to when the Next Block function key is pressed or the navigation style is Change Block.
Optimizer Hint Contains a hint string the form can pass to the Oracle data- base. It is used to construct queries and can improve perfor- mance.
Order By Clause Contains an order by expression that will be used by the form to order the displayed records.
Prev. Navigation Block Determines the block the form will navigate to when the Previous Block function key is pressed.
Primary Key Forces the form to determine whether any inserted or updated records in the block have a unique primary key before committing the record.
Query Allowed Determines whether the operator may perform a query on the block.
Record Orientation Determines whether the records will be displayed in a tabular or form style. The tabular style places record items adjacent to

Page 351

Property Name Description
each other. The form style spreads the items.Orientation generally applies only when multiple records are displayed.
Records Buffered Determines the minimum amount of records buffered in memory during a query. Processing speed can be improved by increasing this value.
Records Fetched Determines the number of records fetched from the database at one time. A smaller value will increase response time,but will increase overall processing time.
Records Displayed Determines the number of records displayed by the block.
Scroll Bar Determines whether the block will have a scroll bar.The values are true or false.
Transactions Triggers Specifies that the block is a transactional control block. This is a nondatabase block that Forms should manage as a transactional block.
Update Allowed Determines whether the records on the block may be modified.
Update Changed A value of true will cause Forms to update only the columns that have been changed during an update transaction. A value of false will update all columns on the database.
Where Clause Contains conditional statements that identify a specific subset of records to be returned by a query.

Using the Order By and Where Clause Block Properties

Two common block properties are the order by and where clause. The order by property orders a block's records. This is a very common procedure. Ordering presents the records in a more meaningful format than random display.

NOTE
Many of the tabular blocks I create have a date as a key component of the record. I like to sort these records by descending date. This means the record with the most recent date appears as the first record in the block. In our Employee Update form, blocks TWO and THREE contain records that have dates. These records would be presented better if they were ordered.

You may want to reopen the EMPCH14.FMB file that contains blocks TWO and THREE to see the effect of changing the various block properties. Figure 14.15 shows the Employee update form after the order by property is populated in blocks TWO and THREE. The block TWO order by property receives the expression "purchase_date desc." The block THREE order by property also receives the expression "purchase_date desc." Populating these properties causes the records in the two blocks to be ordered by descending purchase_date.

Page 352

FIG. 14.15
The Employee Update
form after block TWO
and THREE's order by
properties are populated.




The Where Clause property limits the records displayed in a block. As an example, the Where Clause property in the Employee Update form is populated with the expression "tool_cost > 2." This causes the block to display only tool records that cost more than two dollars. Figure 14.16 shows the Employee Update form after this change has been made. Compare it to Figure 14.15 to see the effects of the Where Clause.

FIG. 14.16
The Employee Update
form after the block TWO
Where Clause
property is populated to
exclude tool records
that cost more than two
dollars.




Changing the Navigation Style

The Navigation Style property determines where the cursor moves to after reaching the last item in the record. The same record setting places the cursor on the first item of the record. The change record setting places the cursor on the first item of the next record. The change

Page 353

block setting places the cursor on the first item of the block specified in the Next Navigation Block property.

NOTE
I generally change this property from the default, same record, to the change block settings. The users I support appear to prefer tabbing through all of the fields on a form rather than having to use the mouse or a function key to navigate to another block. For this reason, I generally set the navigation style property to this setting.
Understanding Item Properties

A block is comprised of a number of objects. These consist of boilerplate text and a variety of items. Some of these items are text items, radio buttons, check boxes, and pick lists. Each of the items contains a set of properties. Some item properties are common to all of the item types, but some are dependent upon the type of item. Table 14.4 contains the various item properties and their descriptions. The Item Used For column identifies the type of item the property applies to. The item type codes are: B=button, C=check box, CT=chart item, D=display item, I=image, L=list item, O=OLE container, R=radio group, T=text item, U=user area, and V=VBX control.

Table 14.4 Item Property Types

Property Name Item Used For Descriptions
Access Key C, B, R, L Determines the character used as the access key. The key allows the operator to select or execute an item (push a button) by pressing the key combination.
Alignment D, T Determines the text alignment. A value of left causes left justification. The center value centers the text.Right causes the text to be right justified. The start value aligns the text with the starting edge of the item bounding box. The end value aligns the text with the ending edge of the item bounding box.
Auto Hint C, I, B, R, L, T, V, O, U Determines when the hint text will be displayed. A value of true displays the hint whenever the input focus enters the item. When the property is false, the hint will only be displayed by pressing the Help command.
Auto Skip T Causes the cursor to move to the next item after entering the last digit of the item.
                                                                          continues

Previous | Table of Contents | Next