How You Can Use a Master-Detail Frame
The generated master-detail frame displays a master and a detail section. The master section of a frame is used to display a single row passed to it from a calling frame's detail table field. It consists of a set of VCR buttons and a slider to navigate through each selected row, with its values updated automatically in a matrix of fields. Each field is mapped by name and type to the result columns of the master query.
The detail section of a detail frame is used to display the rows of a second query of one or more joined tables that are associated with the master query. It contains a table field, each of whose columns maps by name and type to the result columns of the detail query.
To see the master-detail frame in operation, click Debug, Go on the floating menu bar.
Master Query Table Operations
The Form menu provides commands to enable the user to perform standard database operations on the master query table, such as inserting a new row, duplicating a row, and saving the changes to the table. It also enables you to perform a query or sort the data in the master-detail frame. For more information about sorting and querying, see
How You Can Use a Simple Field Frame.
Detail Query Table Operations
As the user is navigating between rows of the master query, the table field in the detail section of the frame is automatically populated with those rows in the detail query associated with the current row in the master section. The Row menu commands also perform standard database operations on the detail database table, such as adding a new row, duplicating a row, finding text, and copying the table. (For more information about how to find text and copy a table, see
Use a Table Field Frame (see
Use a Table Field Frame)).
A new table can also be created by clicking Form, New. To enter new data, click the control button and select Create First Row. For information about editing data in a table, see
Use a Table Field Frame (see
Use a Table Field Frame).
Synchronous or Asynchronous Frame Processing
In the master-detail frame, keeping the data in the parent and explosion or detail (child) frames “in sync” could be a tedious job. However, using The OpenROAD frame templates, it is handled seamlessly by the frame's synchronization mode.
By default, the generated frame is synchronous, which means that the parent and child frames are both updated when a change is made in either frame. In asynchronous mode, the parent and child frames operate independently.
To make the frame asynchronous, click the control button and then clear Synchronous Detail Frame from the option menu, removing the checkmark.
When the parent frame is in asynchronous mode and the explosion or detail frame is displayed, its VCR buttons do not appear. There is no need for the parent and child to remain synchronized, so these buttons are not necessary. Thus, the presence of the VCR buttons on the explosion or detail frame is dynamic, depending on a selection made at runtime.