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

Login Form

1- You must create a new application of Control type and configure it as shown in the image below. ...

Contact Form

In this tutorial we will be preparing an application of the Control Form type in which the format w...

Registration Form

Registration Form 1- You must create a new application of the type Control and configure it as s...

Fields Digital Signature, Select2, Switch and Slider

This example demonstrates the form fields added in version 9.2 of Scriptcase: Digital Signature, Ra...

Comment this post