5. Working with QBF Operations : QBF Retrieve Operation : Go Operation—View Retrieved Records : View Sort Results for a Master/Detail JoinDef
 
Share this page                  
View Sort Results for a Master/Detail JoinDef
When you retrieve a master record in a Master/Detail JoinDef, QBF automatically retrieves all detail records associated with it. The master record is displayed in simple fields. The detail records display in either a table field or simple fields, depending on which format you chose when you created the JoinDef.
Regardless of the format, use the NextMaster operation to go from one master record to the next. Within each master you can view all associated detail records. If the display includes a table field for the detail records, QBF loads all detail records for a single master into the table field. If all the rows do not fit in your window, you can scroll through them. QBF displays an Out of Data message if you attempt to scroll past the end of the table field. You can suppress this message by changing the setting of the II_SCROLL_MSG environment variable/logical. For details, see the System Administrator Guide.
The following figure is an example of a retrieval for a Master/Detail JoinDef.
The preceding example includes a master row and its associated detail rows. The detail rows in the table field are sorted in ascending order, based on the Task column.
The following are the operations when records appear only in simple‑field format:
NextMaster
Retrieves the next master record.
Query
Clears the window of all retrieved information and allows you to make another query.
NxtDetail
Retrieves the next detail record.
Help, End
Standard operations.
Use the NextMaster operation to display a master record and the first detail record associated with it. Use NxtDetail to display the next detail record associated with the same master; the master data cannot change. If you choose NxtDetail when the last detail for that master has been displayed, QBF displays the following message:
No more details for this master . . .
It then retrieves the next master and its first detail record.
When QBF has displayed all rows delivered by your query, it displays the following message:
No more masters