This post is the continuation of our Advanced Master/Detail tutorial. Click here to read the first part of the tutorial.

Once the master is created it is time to create the detail form.

Creating a Detail Form:

1 – Create a new form of the type Editable grid view based on the table order_details.

2 – On the application menu, click on the field positioning.

3 – Remove the fields OrderDetailsID and OrderID.

4 – On the application menu click on Fields and select the field ProductID.

5 – Change to Data type of the field to Select.

6 – Still on the field ProductID go to the Lookup Settings, On the SQL Select Statement insert the following Query of the image:

7 – Still in Fields on the application menu click on New Field.

8 – Create only one field, then click next.

9 – Change the type to Decimal, Name and Label to Total.

Creating methods in the Detail Form.

10 – On the application menu access the programming tab, then expand PHP Methods -> New Method.

11 – Create a new method called calculate_total.

12 – Insert the code from the following image:

13 – Create a new method called check_stock.

14 – Insert the code from the following image:

15 – Create a new method called update_master.

16 – Insert the code from the following image:

Tomorrow we will post the third and last part of the Advanced Master/Detail tutorial.

Read the fist part of this tutorial. LINK HERE

To read the 3rd and last part of this tutorial click here

Learn more about this and other features that Scripcase offers. Do you already know Scriptcase? Download the free version of our tool and discover a world of new possibilities.

To know a little bit more about Scriptcase Master/Detail feature don’t miss our Q&A Webinar about “Advanced Master/Detail on Scriptcase”on next Friday (June 06th), click on this link to register.

You might also like…

PROCESAMIENTO AJAX EN SCRIPTCASE

Ajax en los formularios de Scriptcase puede usarse para recargar un campo de tipo de select basado e...

IMPORTAR IMAGENES DE LA BASE DE DATOS Y UTILIZAR CLASES DE BOOSTRAP

Como muchas personas ya saben, Bootstrap es una biblioteca de front-end libre y de código abierto p...

TENDENCIAS DE DESARROLLO WEB PARA 2017

Usted verá en este post tendencias para 2017 en Diseño Web, en el medio digital y en el desarrollo...

Comment this post

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.