Contents

 
Home
PHPRunner 8.0 manual
Prev Page Next Page
 
 

Setting master-detail relationship between tables

 

Master-detail 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-detail tables on the same page.

Note that one master table can have multiple detail tables. And you can display data from multiple detail 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.

master_multiple_details

To create master-detail relationship in PHPRunner:

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

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

step3-4

3. Choose what table is Master and select link fields in both tables. If you'd like to display master table info on the Details page select the corresponding check box. Click OK. See examples of Master page and Details page settings below.

Preview detail records in popup:

detail_popup

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

Preview detail records inline:

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

inline_popup

Display detail records on the View page:

details_preview_view_page

Display master table info on the Details page:

master_info_on_details

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

step3

If one master table has two or more detail tables, you can order detail 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.

master_detail_order

master_detail_order_det

For more information, see Master-detail relationship.

Charts and reports as master and detail tables

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

Chart as detail table:

chart_as_details

Chart as master table:

chart_as_master

Report as details table:

report_as_details

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