Show list of entities in dropdown

0
How to show attribute from list of entities in a dropdown. simple things in Mendix appear to be difficult
asked
3 answers
0

image.png

* Customer to Order is 1-N(ie one customer will have multiple orders) but that option is not possible in Mendix.

 

This is my usecase(all attributes are not included) , i wanted to have a page for customer summary where customer should be able to see the orders in a dropdown. if I change the owner of the association the customer - order navigation is not possible

 

answered
0

Hi Ahul,

If want to One customer has multiple orders first change the association just reverse upper association.

 

Go to order_NewEdit page if not exist create a new pop up page take dataView source order entity parameter.

 

In this page take reference selector & select attribute Name(Customer) from association.

This will work your requirement.

 

Hope you like the answer.

answered
0

Hi Ahul,

 

You're current domain model means a customer can only have one order but multiple customers can have the same order. If you want it so a single customer can have multiple orders then you can remove the Many to One relationship Customer_Order and instead drag from Order to Customer to create Order_Customer

 image.pngimage.png

Now on a page you can use a list view to view all of the orders for a specific customer

image.png

If you want it so that when a user selects an Order from the list it brings up the details you can use a DataView with the datasource that listens to the Listview like so: 

image.png

this will look like the following:

image.png

 

Thanks,

 

Chris

 

answered