9.5 Creating Master Detail Forms

Developers can create a master detail form with either the Create Application Wizard or the Create Page Wizard.

9.5.1 About Master Detail Forms

A master detail form enables users to query, insert, update, and delete values from two related tables or views. You choose the tables on which to build the master and detail regions.

A master detail form reflects a one-to-many relationship between tables in a database. Typically, a master detail form displays a master row and multiple detail rows. When you create a master detail form using the Create Page or Create Application Wizards, you choose the tables on which to build the master form and the detail form. App Builder supports three types of master detail form options: Stacked; Drill Down; and Side by Side. While the Create Page Wizard supports all master detail form options, the Create Application Wizard supports only Stacked and Side by Side.

Stacked Master Detail

A Stacked master detail form contains a single page with editable interactive grids based on two related tables or views. Users select a row in the master grid to update the detail grids. Developers can create a stacked master detail with either the Create Application Wizard or the Create Page Wizard.

The following example displays master detail interactive grids on the same page. The user has option of interacting with either the master or the detail without leaving the page.

Description of master_detail_single_1.png follows
Description of the illustration master_detail_single_1.png

The previous illustration shows the master interactive grid with the project, Develop Production Partner Portal selected. The next illustration shows detail interactive grids for Milestones and Tasks.

Description of master_detail_single_2.png follows
Description of the illustration master_detail_single_2.png

Drill Down Master Detail

A Drill Down master detail contains two pages based on two related tables or views. The first page contains an interactive report for the master table. The second page features a standard form for the master and interactive grids for the detail. Developers can create a Drill Down master detail with the Create Page Wizard.

In this example, users click the Edit icon to view project details. The second page includes both a standard form (for the master) and editable interactive grids.

For numeric and date fields, you can also pre-define date and number format masks, or apply those format masks after generating the initial form. Wizard generated master detail forms also automatically create validations for some columns. Validations are created for columns that are set to NOT NULL in the underlying table and columns of type NUMBER, DATE or TIMESTAMP. Note that validations are not created for columns if the column is set to read-only, either based on the user's selection, or defined user interface defaults.

Tip:

You can control the appearance of a specific column by editing column attributes.

Side by Side Master Detail

A Side by Side master detail form contains a single page master detail utilizing a side by side layout and report regions with modal edit windows. The left side contains a master list to navigate to the master record. The right side contains the selected master record and the associated detail report(s). Developers can create Side by Side master detail with either Create Application Wizard or Create Page Wizard.

The illustration that follows shows the Milestones detail interactive report. Users can Milestones by clicking an Edit icon.

9.5.2 Creating a Master Detail Form Using the Create Application Wizard

Run the Create Application Wizard to create a new application containing one or more pages. Supported master detail forms include Stacked and Side by Side.

Tip:

The Create Application Wizard uses general best practices to generate the application and does not include several advanced options included in the Create Page Wizard.

To create a master detail form using the Create Application Wizard:

  1. On the Workspace home page, click the App Builder icon.
  2. Click the Create button.
  3. Click New Application.
  4. For Name, enter the name used to identify the application to developers.
  5. For Appearance, accept the default Theme Style and menu layout (Vita, Side Menu), or change it by clicking the Set Appearance icon adjacent to the Appearance field.
  6. To add a report, click Add Page and select then select Master Detail.
  7. On Add Master Detail Page:
    1. Page Name - Enter a name for this page.
    2. Set Icon - Select an icon to display in the navigation menu for this page.
    3. Page Type - Select one of the following:
      • Side by Side - Creates a single page (or Side by Side) master detail with a master table and detail table. The left side contains a master list to navigate to the master record. The right side contains the selected master record and the associated detail report.

      • Stacked - Creates single page master detail with editable interactive grids.

      If Page Type is Side by Side:

      • Table - Select the master table for the page.

      • Primary Display Column - Select the column to display in the list of master records.

      • Secondary Display Column - Select the descriptive column to display in the list of master records, under the Primary Display Column.

      • Detail Table - Select the detail table.

      If Page Type is Stacked:

      • Table - Select the master table for the editable interactive grid.

      • Detail Table - Select the detail table for the page.

    4. Advanced - Expand Advanced:
      • Page Help - Enter text to be displayed when the user selects Page Help.

        Tip:

        This setting requires you select the Help Pages feature. If the Help Pages feature is not selected, the Help icon is not be generated and end users cannot access page help.

    5. Click Add Page.
  8. Under Features, select features to include with the application. Features provide application-level functionality and are typically added once per application. To learn more, click the Help icon adjacent to Features.

    Tip:

    Click the Check All button to select all features.

  9. Under Settings, specify settings used to generate this application. To learn more about an attribute, click the Help icon adjacent to Settings.
  10. Click Create Application.
  11. To view the new master detail page, click Run Page.
    The rendered page appears.

9.5.3 Creating a Stacked Master Detail Using the Create Page Wizard

Run the Create Page Wizard to add a single page (or Stacked) master detail form that uses an local or external data source.

A Stacked master detail form contains a single page with editable interactive grids based on two related tables or views. Users select a row in the master grid to update the detail grids.

9.5.3.1 Creating a Stacked Master Detail Using a Local Database

To create a Stacked master detail on a new page using a local database:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.
  3. Click Create Page.
  4. For Create a Page:
    1. Page Type - Select Component and then Master Detail.

      Tip:

      Component pages provides page-level functionality and can be added multiple times within a given application such as reports, forms, charts, or calendars. Feature pages provide application-level functionality and can only be added once per application.

    2. Select Stacked.
  5. On Page Attributes:
    1. Page Number - Enter the page number of the master page. If you identify a new page number, the wizard creates a new page. If you identify an existing page number, the wizard adds the component to that page.
    2. Page Name - Enter the name of the page.
    3. Page Mode - Identify the page mode. Options include:
      • Normal - The page is presented as a normal Application Express application page.

      • Modal Dialog - The page is presented as a modal dialog. A modal dialog is an overlay window positioned within the viewport, which remains active and focused until the end user dismisses (closes) it. The underlying page is grayed out and the end user is prevented from interacting with the rest of the page until the dialog is closed.

    4. Breadcrumb - Select whether you want to use a breadcrumb navigation control on your page. If you elect to include breadcrumb navigation, additional attributes appear.
    5. Click Next.
  6. For Navigation Preference:
    1. Select how you want this page integrated into the Navigation Menu. To learn more, see field-level Help.
    2. Click Next.
  7. For Master Source:
    1. Master Region Title - Enter a region title for the master region.
    2. Location - Select Local Database.
    3. Location - Local Database.
    4. Table / View Name - Select the table or view on which the grid will be based.
    5. Primary Key Column - Select the name of the column that uniquely identifies a row in the table.
    6. Select Columns - Select one or more columns to be included in the region. Select all columns to be displayed.
    7. Click Next.
  8. For Detail Source:
    1. Detail Region Title - Enter a region title for the detail region.
    2. Location - Local Database.
    3. Table/View Name - Select the table or view on which the grid is based.
    4. Primary Key Column - Select the name of the column that uniquely identifies a row in the table.
    5. Master Detail Foreign Key - Select the foreign key that relates between the master and detail tables.
    6. Select Columns - Select one or more columns to be included in the region. Select all columns to be displayed.
    7. Click Create.
    The Page Designer appears.
  9. To view the new master detail, click Save and Run Page.
    The rendered page appears.

9.5.3.2 Creating a Stacked Master Detail Using External Data Sources

The component(s) described in this topic include built-in support for REST Enabled SQL and REST Data Sources which enables read and write access to remote data sources. In order to build a component on a remote data source, you must first create the application and configure the external data source.

To create a single page master detail master detail on a new page using an external data source:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.
  3. Click Create Page.
  4. For Create a Page:
    1. Page Type - Select Component and then Master Detail.

      Tip:

      Component pages provides page-level functionality and can be added multiple times within a given application such as reports, forms, charts, or calendars. Feature pages provide application-level functionality and can only be added once per application.

    2. Select Stacked.
  5. On Page Attributes:
    1. Page Number - Enter the page number of the master page. If you identify a new page number, the wizard creates a new page. If you identify an existing page number, the wizard adds the component to that page.
    2. Page Name - Enter the name of the page.
    3. Page Mode - Identify the page mode. Options include:
      • Normal - The page is presented as a normal Application Express application page.

      • Modal Dialog - The page is presented as a modal dialog. A modal dialog is an overlay window positioned within the viewport, which remains active and focused until the end user dismisses (closes) it. The underlying page is grayed out and the end user is prevented from interacting with the rest of the page until the dialog is closed.

    4. Breadcrumb - Select whether you want to use a breadcrumb navigation control on your page. If you elect to include breadcrumb navigation, additional attributes appear.
    5. Click Next.
  6. For Navigation Preference:
    1. Select how you want this page integrated into the Navigation Menu. To learn more, see field-level Help.
    2. Click Next.
  7. For Master Source:
    1. Master Region Title - Enter a region title for the master region.
    2. Location - Select a data source. Options include:
      • Local Database - Data is sourced from a local database.

      • REST Enabled SQL Service - Data is sourced from a remote database, where the connection is defined using REST Enabled SQL. To create or maintain REST Enabled SQL references, navigate to Shared Components, REST Enabled SQL.

      • REST Data Source - Data is sourced from a RESTful web service defined using REST Data Sources. REST Data Source are created and maintained within Shared Components.

    3. For Location, select either REST Enabled SQL Service or REST Data Source .
  8. What displays next changes based on your selection. Follow the on-screen instruction. To learn more about an attribute, see field-level Help.
  9. To view the new master detail, click Save and Run Page.
    The rendered page appears.

9.5.4 Creating a Side by Side Master Detail Using the Create Page Wizard

Run the Create Page Wizard to add a new page with a Side by Side master detail that uses a local or external data source.

A Side by Side master detail form contains a single page master detail utilizing a side by side layout and report regions with modal edit windows. The left side contains a master list to navigate to the master record. The right side contains the selected master record and the associated detail report(s).

9.5.4.1 Creating a Side by Side Master Detail Using a Local Database

To create a Side by Side master detail on a new page using a local database:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.
  3. Click Create Page.
  4. For Create a Page:
    1. Page Type - Select Component and then Master Detail.

      Tip:

      Component pages provides page-level functionality and can be added multiple times within a given application such as reports, forms, charts, or calendars. Feature pages provide application-level functionality and can only be added once per application.

    1. On Create Page, select Side by Side.
  5. On Page Attributes:
    1. Starting Page Number - Enter an unused starting page number. This wizard will create multiple pages starting with the number specified. The default is the first available page number within this application.
    2. Master Detail Page Name - Enter the name of the master detail page which contains side by side master detail regions. The left side contains a master list to navigate to navigate to the master record. The right side contains the selected master record and the associated detail report.
    3. Breadcrumb - Select whether you want to use a breadcrumb navigation control on your page. If you elect to include breadcrumb navigation, additional attributes appear.
    4. Click Next.
  6. For Navigation Preference:
    1. Select how you want this page integrated into the Navigation Menu. To learn more, see field-level Help.
    2. Click Next.
  7. On the Master Detail Source, specify the following:
    1. Table/View Owner - Select the owner of the table on which you are building master detail page.
    2. Master Table - Select the master table or view.
    3. Primary Display Column - Select the column to display as primary column in the report to navigate to a different master record.
    4. Secondary Display Column - Select the column to display as secondary column in the report to navigate to a different master record.
    5. Detail Table - Select the detail table or view.
    6. Detail Table 2 - Select the detail table or view (optional).
    7. Detail Table 3 - Select the detail table or view (optional).
    8. Detail Table 4 - Select the detail table or view (optional).
    9. Click Create.
  8. To view the new master detail, click Save and Run Page.

The rendered pages appear.

9.5.4.2 Creating a Side by Side Master Detail Using External Data Sources

The component(s) described in this topic include built-in support for REST Enabled SQL and REST Data Sources which enables read and write access to remote data sources. In order to build a component on a remote data source, you must first create the application and configure the external data source.

To create a Side by Side master detail on a new page using an external data source:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.
  3. Click Create Page.
  4. For Create a Page:
    1. Page Type - Select Component and then Master Detail.

      Tip:

      Component pages provides page-level functionality and can be added multiple times within a given application such as reports, forms, charts, or calendars. Feature pages provide application-level functionality and can only be added once per application.

    2. On Create Master Detail, select Side by Side.
  5. On Page Attributes:
    1. Starting Page Number - Enter an unused starting page number. This wizard will create multiple pages starting with the number specified. The default is the first available page number within this application.
    2. Master Detail Page Name - Enter the name of the master detail page which contains side by side master detail regions. The left side contains a master list to navigate to navigate to the master record. The right side contains the selected master record and the associated detail report.
    3. Breadcrumb - Select whether you want to use a breadcrumb navigation control on your page. If you elect to include breadcrumb navigation, additional attributes appear.
    4. Click Next.
  6. For Navigation Preference:
    1. Select how you want this page integrated into the Navigation Menu. To learn more, see field-level Help.
    2. Click Next.
  7. On the Master Detail Source, click the Advanced button. Edit the following:
    1. Master Region Title - Enter a region title for the master region.
    2. Location - Select a data source. Options include:
      • Local Database - Data is sourced from a local database.

      • REST Enabled SQL Service - Data is sourced from a remote database, where the connection is defined using REST Enabled SQL. To create or maintain REST Enabled SQL references, navigate to Shared Components, REST Enabled SQL.

      • REST Data Source - Data is sourced from a RESTful web service defined using REST Data Sources. REST Data Source are created and maintained within Shared Components.

    3. For Location, select either REST Enabled SQL Service or REST Data Source .
  8. What displays next changes based on your selection. Follow the on-screen instruction. To learn more about an attribute, see field-level Help.
  9. To view the new master detail, click Save and Run Page.
    The rendered page appears.

9.5.5 Creating a Drill Down Master Detail Using the Create Page Wizard

Run the Create Page Wizard to add a two page Drill Down master detail that uses a local or external data source.

A Drill Down master detail contains two pages based on two related tables or views. The first page contains an interactive report for the master table. The second page features a standard form for the master and interactive grids for the detail.

9.5.5.1 Creating a Drill Down Master Detail Using a Local Database

To create a two page Drill Down master detail using a local dataase:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.
  3. Click Create Page.
  4. For Create a Page:
    1. Page Type - Select Component and then Master Detail.

      Tip:

      Component pages provides page-level functionality and can be added multiple times within a given application such as reports, forms, charts, or calendars. Feature pages provide application-level functionality and can only be added once per application.

    2. Select Drill Down.
  5. On Page Attributes:
    1. Master Page Number - Enter the page number of the master page. The master page will contain a read-only master interactive grid. Enter a new page number or an existing page number.
    2. Master Page Name - Enter the name of the master page.
    3. Detail Page Number - Enter the page number of the detail page. The detail page will contain a form and editable interactive grid..
    4. Detail Page Name - Enter the name of the detail page.
    5. Breadcrumb - Select whether you want to use a breadcrumb navigation control on your page. If you elect to include breadcrumb navigation, additional attributes appear.
    6. Click Next.
  6. For Navigation Preference:
    1. Select how you want this page integrated into the Navigation Menu. To learn more, see field-level Help.
    2. Click Next.
  7. For Master Source:
    1. Table/View Owner - Select the owner of the table on which you are building the interactive grid.
    2. Table/View Name - Select the table or view on which the grid is based.
    3. Primary Key Column - Select the name of the column that uniquely identifies a row in the table.
    4. Form Navigation Order - Select the navigation order column used by the previous and next buttons on the Detail Page which navigates to a different master record.
    5. Select Columns - Select one or more columns to be included in the region. Select all columns to be displayed.
    6. Click Next.
  8. For Detail Source:
    1. Table/View Owner - Select the owner of the table on which you are building the interactive grid.
    2. Table/View Name - Select the table or view on which the grid is based.
    3. Primary Key Column - Select the name of the column that uniquely identifies a row in the table.
    4. Master Detail Foreign Key - Select the foreign key that relates between the master and detail tables.
    5. Select Columns - Select one or more columns to be included in the region. Select all columns to be displayed.
    6. Click Create.
    Page Designer appears.
  9. To view the new master detail, click Save and Run Page.

The rendered pages appear.

9.5.5.2 Creating a Drill Down Master Using External Data Sources

The component(s) described in this topic include built-in support for REST Enabled SQL and REST Data Sources which enables read and write access to remote data sources. In order to build a component on a remote data source, you must first create the application and configure the external data source.

To create a two page drill down master detail using an external data sources:

  1. On the Workspace home page, click the App Builder icon.
  2. Select an application.
  3. Click Create Page.
  4. For Create a Page:
    1. Page Type - Select Component and then Master Detail.

      Tip:

      Component pages provides page-level functionality and can be added multiple times within a given application such as reports, forms, charts, or calendars. Feature pages provide application-level functionality and can only be added once per application.

    2. On Create Page, select Drill Down.
  5. On Page Attributes:
    1. Master Page Number - Enter the page number of the master page. The master page will contain a read-only master interactive grid. Enter a new page number or an existing page number.
    2. Master Page Name - Enter the name of the master page.
    3. Detail Page Number - Enter the page number of the detail page. The detail page will contain a form and editable interactive grid..
    4. Detail Page Name - Enter the name of the detail page.
    5. Breadcrumb - Select whether you want to use a breadcrumb navigation control on your page. If you elect to include breadcrumb navigation, additional attributes appear.
    6. Click Next.
  6. For Navigation Preference:
    1. Select how you want this page integrated into the Navigation Menu. To learn more, see field-level Help.
    2. Click Next.
  7. On the Master Source, edit the following:
    1. Location - Select a data source. Options include:
      • Local Database - Data is sourced from a local database.

      • REST Enabled SQL Service - Data is sourced from a remote database, where the connection is defined using REST Enabled SQL. To create or maintain REST Enabled SQL references, navigate to Shared Components, REST Enabled SQL.

      • REST Data Source - Data is sourced from a RESTful web service defined using REST Data Sources. REST Data Source are created and maintained within Shared Components.

    2. For Location, select either REST Enabled SQL Service or REST Data Source .
  8. What displays next changes based on your selection. Follow the on-screen instruction. To learn more about an attribute, see field-level Help.
  9. To view the new master detail, click Save and Run Page.
    The rendered page appears.