Tuesday, November 18, 2008

RECORD BUILTINS



CLEAR_RECORD
Description
Creates a new record in the current block after the current record. Form Builder then navigates to the new record.
Example clear_record;
CREATE RECORD
Description
Creates a new record in the current block after the current record. Form Builder then navigates to the new record.
Example create_record;
DELETE RECORD
Description
When used outside an On-Delete trigger, removes the current record from the block and marks the record as a delete.
Records removed with this built-in are not removed one at a time, but are added to a list of records that are deleted during
the next available commit process.
If the record corresponds to a row in the database, Form Builder locks the record before removing it and marking it as a
delete.
If a query is open in the block, Form Builder fetches a record to refill the block if necessary. See also the description for the
CLEAR_RECORD built-in subprogram.
BEGIN
Delete_Record;
END;
FIRST RECORD
Description
Navigates to the first record in the block's list of records.
Example first_record;
LAST RECORD
Description
Navigates to the last record in the block's list of records. If a query is open in the block, Form Builder fetches the remaining
selected records into the block's list of records, and closes the query.
Example last_record;
NEXT RECORD
Description
Navigates to the first enabled and navigable item in the record with the next higher sequence number than the current record.
If there is no such record, Form Builder will fetch or create a record. If the current record is a new record, NEXT_RECORD
fails.
Example next_record;
PREVIOUS RECORD
Description
Navigates to the first enabled and navigable item in the record with the next lower sequence number than the current record.
Example Previous_record;
SCROLL DOWN
Description
Scrolls the current block's list of records so that previously hidden records with higher sequence numbers are displayed. If
there are available records and a query is open in the block, Form Builder fetches records during SCROLL_DOWN processing.
In a single-line block, SCROLL_DOWN displays the next record in the block's list of records. SCROLL_DOWN puts the input
focus in the instance of the current item in the displayed record with the lowest sequence number.
Scroll_Down;
SCROLL UP
Description
Scrolls the current block's list of records so that previously hidden records with lower sequence numbers are displayed. This
action displays records that were "above" the block's display.
SCROLL_UP puts the input focus in the instance of the current item in the displayed record that has the highest sequence
number.
BEGIN
Scroll_up;
END;
SELECT RECORD
Description
When called from an On-Select trigger, initiates default Form Builder SELECT processing. This built-in is included primarily for
applications that run against a non-ORACLE data source, and use transactional triggers to replace default Form Builder
transaction processing.
Example
Select_record;
UP BUILT IN
Description
Navigates to the instance of the current item in the record with the next lowest sequence number.
Example up;
DOWN BUILT IN
Description
Navigates to the instance of the current item in the record with the next higher sequence number. If necessary, Form Builder
fetches a record. If Form Builder has to create a record, DOWN navigates to the first navigable item in the record.
Example down;
LOCK RECORD
Description
Attempts to lock the row in the database that corresponds to the current record. LOCK_RECORD locks the record
immediately, regardless of whether the Locking Mode block property is set to Immediate (the default) or Delayed.
When executed from within an On-Lock trigger, LOCK_RECORD initiates default database locking. The following example
illustrates this technique.
Begin
Lock_record;
End;
UPDATE RECORD
Description
When called from an On-Update trigger, initiates the default Form Builder processing for updating a record in the database
during the Post and Commit Transaction process.
This built-in is included primarily for applications that run against a non-ORACLE data source.
Begin
Update_record;
End;

OM Cycles

OM Cycles