Add a list to your form and create the master-detail relationship.
A Genero application can display a form that contains a master-detail relationship between two
tables. The user can search for a row in the master table, and the corresponding rows in the detail
table will also be displayed. The values in rows from both tables can be added, deleted, or
modified.
The form must contain fields from both tables and the table relationships must be set.
In the form, enlarge the grid around the fields from the master table to make room for
the fields from the other table.
Select Container > Data Control.
The Extend Form from Database dialog displays, showing the
Column Selection page.
Select these columns from the orders table: orderid, userid, orderdate, totalprice and
creditcard. Use the right arrow to add the selected fields to the Selected Fields list. Click
Next >.
Select Table as the container. and click Finish.
The cursor is set to allow you to place your container on the form.
Draw the container within the enlarged grid, under the existing fields.
This form design now contains fields from the master table (account) and a detail table
(orders).
Select the Records tab. Select the master table record and make sure the
active property is checked. Select and identify a column as the unique key, if not already
identified.
Tip: The unique key is identified by the key icon.
Do the same for the detail table record.
Set the relationship between the master and detail records. Right-click the foreign key field
in the detail table record (orders.userid, in our example), and select Add
Relation To. Drag the arrow to point to the primary key in the master table record
(account.userid).
Select File > Save All to save the project and the modifications to its contents.