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…

Scriptcase uses the MVC template?

Maybe you might have thought about this at some point, “Scriptcase uses the MVC templates?" Well, ...

How to implement A2F using Own Development in NodeJS in a Scriptcase application

A2F using Own Development in NodeJS A2F: In a previous article, we talked about Swivel as an extern...

Specialists or generalists, who gets a better advantage by using Scriptcase?

Hey there! Today  we will figure what are the ideal profiles for those who wish to take advantage o...

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 Learn more about our Privacy Police.