Reading Records

The way in which records are read from the database is determined by the access mode. The access modes for records on the main table are as follows:

Access Mode Description
Already fetched Process a record which has already been read from the database or has been set up in an earlier procedure body
Batch Process a sequential group of records automatically. Use this in a repeated procedure – the next record in the selected direction is read automatically
Normal Read a record when all the key components have been filled in during the procedure
Line (Auto and normal) Combine normal and batch access for use in repeated procedures, but Window access is the preferred method
Window Display a list of existing records for the user to select and update records. If new records are allowed, an Add new record option will be offered. This option is useful for processing a child table
Cleared window As Window access (above), but clear the screen when a selection is made
Set up mode Initialise fields for access in later batch procedures
Preview window Display a group of records for preview purposes. For example, all the order lines for an order could be displayed before the order is selected for amending

Reading a Group of Records

There are four ways of limiting the records that are read from the database:

Option to fetch record Description
Condition on record The condition specified must be satisfied for a record to be processed. Set this up in Main Table Processing
Check parent or Join parent This will only fetch records with matching parents on the database. Select the Check Parent option in the Related Table Processing for the parent of the table
Parent already fetched This limits the search to records that have already been selected in an earlier procedure. Select the Already fetched option in the Related Table Processing for the parent of the table
Formula on key field For records where the user enters the key, the formula can be used to determine whether the record is fetched. Set this up under Field Processing for the key field