Tips & Tricks - M-to-N Relationships
This post shows how references can be used to establish an M-to-N relationship. Any number of line items can be entered for an order.
You can download the sample application here and then import it as usual.
Application Structure
The application consists of the data groups "Items," "Orders," and the subordinate data group "Line Items," in which data can be entered on the respective input pages.
Here you can see the "Add Item" entry page in the browser view. Items that have already been entered are listed in the table view below the input fields.
Orders can be entered on the "Enter Order" page.
You can find your existing orders on the "Orders" page. Clicking "Select Record" at
opens the order.
By clicking "Enter Item," you can create any number of items per order here, thereby establishing an M (order) to N (item) relationship.
This relationship is created quite simply by a reference that is defined in the properties of the "Position" data group and links to the data fields of the "Item" data group.
On the "Enter Position" input page, a drop-down list retrieves the values from the referenced data fields. The displayed value is composed of the item number and the item description.
Here you can see the "Enter Position" input page in the browser. You can find more information on the topic of "References" here.






