Was this helpful?
Add Additional Tables to a Generated Frame
You can specify additional tables—lookup, associate, and detail primary tables—while creating a frame using one of the mastdetl predefined templates.
Create Lookup Tables
Lookup tables are bound to a specific column in a primary table and are used to provide a list of possible values for those columns. Lookup tables are also used during user input as a validation mechanism.
To create a lookup table for a primary table
1. Create another primary-detail frame.
For more information, see Create a primary-Detail Frame.
2. Select the appropriate table icon in the query display area.
3. Click Add Lookup Table.
The Select Database Object dialog appears.
4. Enter the name of a lookup table in the Lookup field.
For more information on using the control button to the right of the entry field to specify a table, see Table Selection Dialog.
5. Click OK.
The lookup table is added to the query display area.
6. Insert a join between one or more columns (for example, emp_num), by clicking the Default button or Insert for individually selected columns.
For more information, see How You Can Define Join Column Properties.
7. Select the lookup table icon in the query display area.
8. Define the properties for your lookup table, as described in Lookup Table Properties.
9. Click Generate.
The frame is created and displayed in the Frame Editor.
For example:
Lookup Table Properties
After you have added a lookup table, you can define the join column between the lookup table and another participating table in the frame. The order that the fields appear in the lookup frame can be modified, and you can set whether the end user can further qualify lookup information.
To specify the properties of a lookup table, select the appropriate lookup table icon in the query display area, as shown in the example.
Non_Validating Lookups
When the Non-Validating Lookups option is enabled, the generated frame does not validate the fields in new records (that is, those to be inserted into the corresponding database table) against the values in each field's defined lookup table.
Table Columns
The list field on the left side of the Frame Assistant displays a list of columns in the selected primary table. The right side list field displays the columns in the selected lookup table.
Defining Join Columns
To define the columns to be joined, select the desired row in each list field to be joined, and click Insert. The Default button adds a join between columns with the same name.
Deleting Joins
You can click Delete and then click a particular join column to clear a join that has been inserted. To clear all joins, click Clear.
Field Order
The Order entry field lets you specify which columns appear in the lookup frame (if a value is entered), and the order that each field appears on the lookup frame (determined by a numeric value). By default, the Order field is populated with incrementing values as joins are added.
Lookup Qualification
To set whether the end user can further qualify information displayed in the lookup, select one of the following options in the Lookup Qualification option field:
Allow
Lets the user qualify the lookup frame
On Startup
Requires that the user qualify the lookup before the lookup frame appears
None
Specifies that the user cannot further qualify the lookup frame
Default: Allow
Lookup Frame Name
You can use a custom lookup frame instead of the default lookup frame by entering the name of the custom frame in the Lookup Frame Name field.
How You Can Use a Lookup Frame
A lookup table is used to provide the user with a list of possible choices for a field in a frame. This list is presented in a lookup frame that can allow the user to further qualify the choices in the lookup table. For example, in the primary-detail frame just created, click in the Emp Num entry field.
Next, click Field, Lookup. The Lookup frame appears.
If the lookup frame was created with the Allow Lookup Qualification option, an end user can further qualify the information displayed in the lookup frame by clicking the Qualify button. This displays the Query dialog:
Note:  For more information about using the Query dialog, see Create a Table Field Frame.
Select any row from the lookup table and click OK.
Create an Associate Table
An associate table can be joined to a primary table to provide additional data. The columns from each table can be included as fields in the frame.
To create an associate table
1. Create another primary-detail frame.
2. Select the appropriate table icon in the query display area.
3. Click Add Associate Table.
The Select Database Object dialog appears.
4. Enter the name of an associate table in the Associate field.
For more information on using the control button to the right of the entry field to specify a table, see Table Selection Dialog.
5. Click OK.
The associate table icon is added to the query display area.
6. Insert a join between one or more columns by clicking Default or Insert for individually selected columns.
A line is drawn between the columns indicating the join.
For more information, see How You Can Define Join Column Properties.
7. Select the associate table icon in the query display area.
8. Click Display Properties.
The associate table properties appear.
9. Click in the desired field and select No display from the Usage field.
Note:  Because you probably would not want to display this common field twice (once for each table), the No display option prevents duplicate fields in this case.
For more information about specifying operations that can be performed on fields, see How You Can Set Display Properties.
10. Click Generate.
The frame is created and displayed in the Frame Editor.
Create Detail Tables
You can add additional detail primary tables to frames generated from the master_detail and detail frame templates.
To create an additional detail table
1. Create a new primary-detail frame.
For more information, see Create a primary-Detail Frame.
2. Select the primary primary table icon in the query display area.
3. Click Add Detail Table.
The Select Database Object dialog appears.
4. Enter the name of a detail table in the Detail field.
For more information on using the control button to the right of the entry field to specify a table, see Table Selection Dialog.
5. Click OK.
The detail table icon and a new join icon are added to the query display area.
6. Insert a join between one or more columns by clicking Default or Insert for individually selected columns.
A line is drawn between the columns indicating the join.
For more information, see How You Can Define Join Column Properties.
7. Set the desired query and display properties for the new primary-detail relationship.
For more information, see:
8. Click Generate.
The frame is created and displayed in the Frame Editor.
9. (Optional) Specify the frame's properties using the Property Inspector. For example, set the IsResizeable property to TRUE.
For more information about using the Property Inspector, see Set Frame Properties.
10. To see the additional detail table in the frame, click Debug, Go on the floating menu bar.
The frame appears containing the additional detail table.
11. When you are finished, close the running frame and then click File, Close to exit the Frame Editor, saving changes appropriately.
Last modified date: 06/25/2024