To maintain the master-detail relation at runtime, Oracle Forms coordinates the master and detail blocks to ensure that the records displayed in the detail block are associated with the current record in the master block.
Any event that changes the current record in the master is a coordination-causing event. Deleting a record or pressing [Up] or [Down] to move to a different record are both examples of coordination-causing events. When such an event occurs, Oracle Forms automatically does the processing necessary to coordinate the master and detail blocks.
There are two phases of block coordination: the clear phase and the population phase. During the clear phase, Oracle Forms navigates internally to the detail block and flushes the obsolete detail records. During the population phase, Oracle Forms issues a SELECT statement to repopulate the detail block with the detail records associated with the new master record. These operations are accomplished through the execution of triggers.
To continue the example, consider what happens when the end user is on the first record in the REGION block and presses [Next Record]. Since Next Record is a coordination-causing event, Oracle Forms first navigates internally to the WAREHOUSE block and flushes the existing warehouse records (the clear phase). Oracle Forms then makes the next region the current master record in the REGION block, and fetches the records of those warehouses that are within the selected region (the population phase).