The master-detail form is commonly used when we need to show the main form and his details, that is stored in a different table, at the same page. To allow a master-detail to happens, we must have a relationship 1 to N between the master and the detail.
The most used examples of a master-detail relationship are purchase orders and a list of items belonging to each purchase order, an expense report with a set of expense line items or a department with a list of employees belonging to it. An application can use this master-detail relationship to enable users to navigate through the purchase order data and see the detail data for line items only related to the master purchase order selected.
On Scriptcase to create such application is very easy, all you need to do is create the master form, create the detail form and then in a 3 step process link those two forms, all the relationship and the common fields are automatically recognized by Scriptcase in this process.
Check Some Examples
Form Master-Detail (Single-to-Single)
Create Master-Detail forms using a simple Single Record Form to view the details of the application.
In this example, a complete master / detail application is developed. Here two forms are created. The first (Master) is based on the orders table and the second (Detail) is based on the orders details.
Simple Master-Detail for Employees/Projects
Simple Master / Detail application using a Grid (to list the employees), a Form (to edit the employee) and an Editable Grid (to edit the employee’s detail).
There is a few things that would help you even more to create a master detail on Scriptcase, suppose that you have an order form with a total field as the master and the details of this order as detail, and every time that you add a new detail you need to recalculate the total field from the master, on Scriptcase with a simple use of a macro that can be done in a single line of code.