Advanced Techniques - Many-to-many relationships

General

This workshop shows you how to create a many-to-many relationship using references. An order can contain any number of article items.

Example application

The example application for this workshop can be downloaded here and imported into your portal as usual.

Application structure




The application contains three data groups: "Articles", "Orders" and the child data group "Order items". Each of these contains an edit page where the corresponding data can be entered.



This is the "Create article" page in the browser. Articles that have already been defined are listed in the view table beneath the edit fields.



Orders can be entered on the "Create order" page.



You can view all existing orders on the "Orders" page. Click on "Select data set" to open an order.



Click on "Add order item" to add any number of order items to an order, thus creating a many(order)-to-many(order item) relationship.



This relationship is easily created via a reference, which is created in the properties of the "Order items" data group and integrates the data fields from the "Items" data group.



On the "Create order item" page, a drop-down list takes it values from the referenced data fields. The displayed value is made up of the article number and article name.



This is the "Create order item" page in the browser. Click here for more information about references.