Add a Relation to a Table
Add a relation to a table in the Application Object Tree (AOT) to associate tables through fields that contain similar information. Table relations can be used to enable end users to view information from different tables in a single form.
-
In the AOT, navigate to Data Dictionary > Tables, and then expand the table that the relation will be added to.
-
Right-click the Relations node, and then choose New Relation.
-
Right-click the newly added relation, and then choose Properties.
-
Set the name of the new relationship by modifying the Name property.
-
In the Table property, select the related table.
-
Use the Validate property to determine if the relation should be used to validate data when information is entered into forms.
-
Right-click the new relation, select New and then click one of the following:
-
Normal to specify relation fields without conditions.
-
Field Fixed to specify relation fields to restrict the records in the primary table.
-
Related Field Fixed to specify relation fields that restrict the records in the related table.
-
-
Proceed to the next section, using the relation that you selected in step 7.
-
For Normal, enter the following in the Field Relation property pages:
-
In the Field property, select the field in the primary table that relates to a field in the related table.
-
In the Related Field property, select the field in the related table.
-
-
For Field Fixed, enter the following in the Field Relation property pages:
-
In the Field property, select the field in the primary table to use to restrict the records.
-
In the Value property, enter the value of the selected field as the filter. This relates only records in the primary table that match that field value. Only numeric values can be entered in the Value property. Field fixed relations can be created only on numeric fields.
Each of the related fields are ANDed in the table relation.
-
-
For Related Field Fixed, enter the following in the Field Relation property pages:
-
In the Value property, enter the filter value of the selected field. This causes only records in the related table that match that field value to be related. Only numeric values can be entered in the Value property. Related field fixed relations can be created only on numeric fields.
-
In the Field property, select the field in the related table to restrict the records.
Each of the related fields are ANDed in the table relation.
-
-
Save your modifications.
Multiple table relations can be created on the same field in a primary table. This is how you can enable the look up values from multiple tables for a single field. For example, the WMSBillOfLading table has a relation to the InventTransferTable and a relation to the SalesTable, depending on the value in the WMSReferenceType column.