In this example, we will see how to create a link between the forms for the maintenance of the tables used in the selection fields (combobox).
You will create two forms
- Product registration, in this register there is a field (select) to select categories.
- Category registration, auxiliary application (pop-up window) for table maintenance categories.
Creating the Categories form
1. Create a new form of the single record type based on the category table.
2. In the application menu, open the Fields folder and click on the categoryid field.
3. Open the Edit Value tab of the database and change the Insert property to Automatic (automatic) increment.
4. In the ScriptCase toolbar, click the Generate Source button.
Creating the product form
5. Create a new application of the single record type based on the product table
6. On the application menu, open the Fields folder and click on the categoryid field.
7. Change the Data Type property to Select.
8. Also in the categoryid field, open the edit tab Lookup Settings
9. In the SQL Select Statement property, enter the following command:
|SELECT categoryid, categoryname |
ORDER BY categoryid
Creating a link to update the categoryid field
10. Also on the edit tab of Lookup Settings, click on the Create link button
11. Select the shape of the previously created categories and click on the Next button.
12. Click on the Save button to complete the connection wizard.