8. Generating Frames from Predefined Templates : The mastdetl Templates : The master_detail Template : Create a Master-Detail Frame
 
Share this page                  
Create a Master-Detail Frame
You can create a master-detail frame using the master_detail frame template.
To create a frame using the master_detail frame template
1. On the Develop tab, select the application in which you want to create the frame in the Applications portlet, and then select the header bar of the Components portlet to make it active.
2. Click File, New, User Frame.
The Create User Frame dialog appears.
3. Enter the component name in the Name field (for example, My_Master_Detail).
4. (Optional) Enter a comment for the component in the Remark field.
5. Select mastdetl from the Application list and the master_detail template from the Template list.
6. Click Create.
The Select Database Object dialog appears.
Note:  The Select Database Object dialog displays two entry fields instead of the usual one.
7. Enter the name of the primary master table in the Master entry field.
8. Repeat this procedure for the primary detail table using the Detail entry field.
For more information about using the control button to the right of the entry field to specify a table, see Table Selection Dialog.
9. Click OK.
The Frame Assistant appears:
10. Click the join icon in the query display area.
11. Before generating the master-detail frame, you must define one or more join columns between the two tables. Then click Insert to create a join.
A line is drawn between the two columns indicating the join.
For more information, see How You Can Define Join Column Properties.
12. Using the Frame Assistant, you can optionally specify additional tables, including lookup or associate tables. You can also select query expressions, query properties, and display properties for result columns.
For more information, see:
How You Can Set Query Expressions
How You Can Set Query Properties
How You Can Set Display Properties
Add Additional Tables to a Generated Frame
13. Click Generate.
If the tables you specified have “updatable” columns but no key, an Information dialog appears.
14. Click OK to continue.
The master-detail frame is created and displayed in the Frame Editor.
Note:  An Open Row and an Open List button are provided in the Frame Editor. They will appear in the running frame only if the master-detail frame is selected as the parent frame to either an explosion or a detail frame (for more information, see Create an Explosion Frame or Create a Detail Frame).
15. (Optional) Specify the frame's properties using the Property Inspector.
For more information about using the Property Inspector, see Set Frame Properties.