Creating a Master Detail Form

Previous
Previous
 
Next
Next

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 a 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 Source, select the primary key column for the master table, and then select the primary key column for the detail table. Options include:

    • Existing trigger - Select this option if a trigger is already defined to populate the primary key.

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

    • Existing sequence - Select this option if there is already an existing sequence you want the wizard to create the necessary trigger.

  9. On Master Options, specify whether or not 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.

  10. On Choose Layout, specify the layout of the master detail pages and click Next.

    You can include the master detail as a tabular form on the same page, or add the master detail on a separate page.

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

  12. On Tab, specify whether or not to include a tab set and click Next.

  13. Click Create.