Previous
Previous
 
Next
Next

Creating a Master Detail Form

A master detail form reflects a one-to-many relationship between two tables in a database. Typically, a master detail form displays a master row and multiple detail rows within a single HTML form. With this form, users can insert, update, and delete values from two tables or views.

To create a master detail form:

  1. On the Workspace home page, click the Application Builder icon.

  2. Select an application.

  3. Click Create Page.

  4. Select Form and click Next.

  5. Select Master Detail Form and click Next.

    The Master Detail Wizard appears.

  6. On Master Table:

    1. Select the table or view owner.

    2. Select a table or view name.

      The columns in that object appear under Available Columns.

    3. Select the columns to display in the form and then click the arrow keys to move them to Displayed Columns.

    4. Click Next.

  7. On Detail Table:

    1. Specify whether to show only related tables by selecting Yes or No.

    2. Select the table or view owner.

    3. Select a table or view name.

      The columns in that object appear under Available Columns.

    4. Select the columns to display in the form and then click the arrow keys to move them to Displayed Columns.

    5. Click Next.

  8. On Primary Key:

    1. Primary Key(s) of Master Table - Select the primary key (or keys) of the master table. You can select maximum of two primary keys for master table.

    2. Primary Key(s) of Detail Table - Select the primary key (or keys) of the detail table. You can select maximum of two primary keys for detail table.

    3. Click Next.

  9. On Master Detail Link, define the relationship between the master and detail tables and click Next.

  10. On Primary Key Source, select the primary key column for the master table and click Next. Then select the primary key column for the detail table and click Next. Options include:

    • Existing trigger - Select this option if a trigger is defined to populate the primary key, or if the user will be expected to enter the primary key value manually. Detail tables do not support user entered primary key values.

    • Custom PL/SQL function - Select this option if you want to provide a PL/SQL function to populate the primary key.

    • Existing sequence - Select this option if an existing sequence will be used to generate the primary key.

  11. On Master Options, specify whether to include master row navigation and click Next.

    If you include master row navigation, define navigation order columns. If a navigation order column is not defined, the master update form navigates by the primary key column.

  12. On Layout, specify how to build the master detail and click Next. Options include:

    • Edit detail as tabular form on same page creates a two page master detail. Edit detail on separate page creates a three page master detail.

    • Edit detail on separate page creates a three page master detail.

  13. On Page Attributes, review and edit the master page and detail page information and then click Next.

  14. On Tab, specify whether to include a tab set and click Next.

  15. Click Create.