Zoom forms contain logic that allow the user to pick a
value from a list that is displayed in a form in a popup window.
- Right-click on the open BA diagram and select New
Zoom Form.
- Right-click the new form and select Implement
Zoom from Database from the context menu.
- Select the database table (in our example, the country table)
that contains the values to be displayed in the zoom form. Select
the column that corresponds to the field on the main form. In our
example, this is the country code. (You can select the country name
also, to display it in the zoom form if you wish; the code field will
be identified as the unique key later in this process.)
Figure 1. Example zoom form definition
- Switch from the form design to the Records tab
and select the master table record. Confirm that the active property
is checked.
- Select the record and confirm that the unique key property
is set. If not, set the unique key on one of the fields in the record.
Figure 2. Records tab.
- Save the Zoom form (4fdz) and add
it to the project structure under the Application node.
- The CRUD form has to be modified to trigger the zoom form
when needed. In this example, the country.code field is changed to
a ButtonEdit, which can trigger an action when the user clicks it.
When the user selects the country code from the zoom form, it is automatically
inserted into the country.code field on the main form. From the BA
diagram, right-click on the main form and choose Open Form.
- Select the field containing the foreign key (in this example,
the account.country field.) Right-click and select Convert
Widget to change the widget to a ButtonEdit.
Figure 3. Convert Widget
- Scroll to the bottom of the properties list, and set the
value of the action property for the ButtonEdit field to a
unique action name (such as zoom).
- Save the form.
- Create a relation between the CRUD form and the Zoom in
the BA diagram. On the open BA diagram, Right-click the CRUD form
icon and select New Relation. Click the CRUD
form icon again and drag the relation arrow to the second form.
- Select the relation arrow to display the relation properties,
and enter the action name in the action property
that is the same as the one assigned to your ButtonEdit field (zoom1,
in this example.) If there is more than one zoom form in an application,
the action name must be unique.
Option |
Description |
Source Field |
Set to the value that will be inserted into on the CRUD form
(account.country, in this example). |
Destination Field |
Set to the value the user selects from the table in the zoom
form (country.code, in this example). |
Open Mode |
Set to DISPLAY (default) or SEARCH. |
Figure 4. Business Application diagram
- Save all diagrams and forms.