In this example we will see how to create a link between forms for maintenance of tables used in select fields (combobox).
Will create two forms
- Register products, in this register there is a field (select) to select categories.
- Register of categories, helper application (pop-up) for categories of table maintenance.
Creating the Categories form
1. Create a new form of the Single Record type based on the categories table.
2. In the application menu open the Fields folder and click the categoryid field.
3. Open the Edit tab Database Value and change the Insert property to Auto increment (Automatic)
4. In ScriptCase toolbar click on the Generate Source button.
Creating the Form of Products
5. Create a new application of the Single Record type based on products table
6. In 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 SQL Select Statement property enter the following command:
SELECT categoryid, categoryname FROM categories ORDER BY categoryid
Creating a link to update the field categoryid
10. Also in Lookup Settings edit tab, click the Create Link button
11. Select the form of categories created earlier and click the Next button.
12. Click the Save button to complete the connection wizard.