PHPRunner 8.1 manual
Prev Page Next Page

Setting master-details relationship between tables


Master-details relationships are commonly used in applications. An example of this type of relationship is an order with a header and line items. In PHPRunner you can join, or link, two or more tables that have at least one common field. You can Add/Edit records in the master-details tables on the same page.

Note that one master table can have multiple details tables. And you can display data from multiple details tables (nested or one master - many details) on the same page. I.e. you can display customers, orders by customer, order details per order and edit all three tables at the same time without leaving the page.


To create master-details relationship in PHPRunner:

1. Go to the Datasource tables page and select both master and details tables in the list of datasource tables..

2. Drag field from one table to another. Table link properties dialog opens.


3. Choose what table is Master and select link fields in both tables. If you'd like to display master table data on the details page select the corresponding check box. Click OK.

See examples of Master and Details settings below.

Show single link for all details:

Link for details is displayed as details_icon icon. Click it to view details tables. Use this option if master table has multiple details tables.


Show individual details links:


Preview details records in popup:


yellowbulbNote: If you select to display details records in popup, you can define the popup page appearance in Visual Editor -> Details preview page for details table.

Preview details records inline:

If you select to display details records inline, you will be able to add/edit/delete details in inline mode on master table.


Display details records on the View page:


Display master table data on the details page:


4. Now master-details relationship is created and displayed as arrow between tables.


If one master table has two or more details tables, you can order details tables as well as select their location (vertical or horizontal). To do this, click the table_context_menu_btn button to open context menu of master table and select the Details tables order. The same dialog is available via right-clicking the link between tables.



For more information, see Master-details relationship.

Print master table data with details

You can print the master table data on the List page with data from details tables.


Example of page to be printed:


Charts and reports as master and details tables

Now you can use charts and reports as both master and details tables.

Chart as details table:


Chart as master table:


Report as details table:


Converted from CHM to HTML with chm2web Standard 2.85 (unicode)