For a base table, Forms Builder can automatically perform the following actions:
Creates items in the data block to correspond to columns in the table (These items are data items or base table items.)
Produces code in the form to employ the rules of the table’s constraints
Generates SQL at run time (implicit SQL) to insert, update, delete, and query rows in the base table, based upon the user’s actions
At run time, you can use standard function keys, buttons, menu options, or standard toolbar options to initiate query, insert, update, or delete operations on base tables, and the subsequent commit of the transaction.
Control Blocks
A control block is not associated with a database, and its items do not relate to any columns within any database table. Its items are called control items. For example, you can create many buttons in your module to initiate certain actions and to logically group these buttons in a control block.
Master Versus Detail Blocks
To support the relationship between data blocks and their underlying base tables, you can define one data block as the detail (child) of a master (parent) data block. This links primary key and foreign key values across data blocks, and synchronizes the data that these data blocks display.
Forms Builder automatically generates the objects and code needed to support master-detail relationships. As the designer, you need only request it.
Note: If your application requires it, you can also create independent data blocks in which there is no relationship between the two data blocks.
Single-Record Versus Multirecord Blocks
You can design a data block to show one record at a time (single-record block) or several records at once (multirecord block). Usually, you create a single-record data block to show master block data and a multirecord data block to show detail block data. In either case, records in a data block that are currently not visible on the screen are stored in a block buffer.