A generated application can include multiple forms.
This task assumes that you have created a BA diagram with a
Program entity.
-
Right-click on the open BA diagram and select New CRUD Form.
-
Right-click the new form and select Implement CRUD Form from Database
from the context menu.
-
Select the database table and fields that you want to have on the new form (the products table,
in our example). Finish and save the form definition file (4fdm) to your
project.
-
To call one form from another, create a second CRUD form by repeating steps 2 and 3.
-
Right-click the first form icon and select New Relation. Click the Form
icon again and drag the relation arrow to the second form.
-
Select the relation arrow in the BA diagram and set the action property in the
Properties view to the action name that you wish to trigger (products in our example).
-
Save the forms and modified BA diagram.
-
Build and run the program. A button is displayed on the calling form to trigger the action to
call the secondary form. This button is added at runtime and can be removed by adding the action to
the Toolbar and/or Topmenu. To do so, modify the default Toolbar (4tb) and/or
Topmenu (4tm) files. Modify the action's display attributes by modifying the
action defaults file (4ad).
Figure 1. BA diagram with two forms