If you really want to select the order via a dropdown, I'd suggest to use a nonpersitable helper object ‘OrderSelectionHelper’ with an association to customer, and to order.
- in your Customer dataview, create a dataview with a GetCreate microflow for the orderSelectionHelper:
- then in that dataview, add a reference selector, which sets the OrderSelectionHelper_Order association
- for the reference selector, you a microflow datasource, and retrieve the Orders of the Customer
- on the orderSelectionHelper dataview, add another dataview, via the association OrderSelectionHelper_Order
now when you select a value in your reference selector, you will see the selected Order in the dataview
I think the easiest way to do this would be:
- have a Customer dataview
- on that Customer dataview, place a Orders datagrid (via association order_Customer)
- on that Customer dataview, and a dataview with datasource: Listen to widget ‘Orders datagrid’
- In that Orders dataview, you can put the details of the order
In Mendix, this looks like this: