Tutorial: Update Related Table (N:N)

In this example we will create an application with update tables with many to many relationship using object Double Select.

Creating a Form

1. Create a new application form based on the employees table.

2. In the application menu click in Fields Positioning and remove all fields except employeeid, lastname, firstname, title and titleofcourtesy.


3. In the application menu open the Fields folder and click on employeeid field.

4. In the edit tab Database Value, change the Insert property to Auto Increment (Automatic).


Creating Many-to-Many relationship

5. In the application menu go to the N-N Relations folder and click on item New Relationship.


6. In the Field property inform territories, for Data Type select Integer and Label inform Territories. To continue, click the Next button.

7. Click on the Choose Table and choose the territories table, and then click the Next button.

8. Check the generated SQL command, if necessary you can modify it. To continue, click the Next button.

9. In the Object property select Double Select option, and the property Height, enter 15.


10. Selecting the relationship table. On the property Table Name, choice employeeterritories.

11. Relating the fields of employees and employeeterritories tables. For the field employeeid select employeeid.


12. This step will be related the Foreign Key field. Select the territoryid field and click Next.


13. View Settings. Change the Vertical Alignment property to Top, and click the Next button.


Tutorials in the same category

Form with special fields

In this example, we'll see how to configure a couple of Scriptcase special fields, in a form applica...

Master-Detail (Single-to-Single)

In this example, a Master / Detail complete application, where we get an edit form of categories and...

Generate PDF from Forms

In this example we will see how to configure the application form to display the button to print the...

Form Mobile

Scriptcase Form applications are generated with mobile responsiveness automatically. Selectin...

Comment this post