Using a Reference Selector for multiple items on the same page

0
Hello,  I am currently trying to use a reference selector on an order form that I am creating. I need to select items from the same entity and designate quantities for each of them, all the items are objects in the same entity, however when I select a value in one reference selector, all others auto fill with the same data. How do I get each to function individually so all the values can be unique on the form.  Thank you in advance
asked
2 answers
2

Sounds like an unorthodox order entity. Usually, the order’s items are stored in a separate entity with a 1-* association for order-orderitem. Your version has a self-reference. Can you share a screenshot of your domain model?

The reference selectors on your page probably refer to the same association. Which causes them all to change, when you change one.

answered
1

Hi Alex,

As Tim mentions you need a orderline entity 

Instead of a single reference selector, you need reference to multiple products. But in a reference you cannot store a additional information, like the quantity etc. So you need a entity in between, in this case orderline.

How to create the right pages and references, please take a look at this learning path: https://academy.mendix.com/link/module/93/lecture/2799/6.7-Information-Entity

Maybe starting at the very beginning of this learning path will be even better to understand the Mendix basics.

 

answered