Xpath constraint reference selector

0
The problem i'm having in mendix is using the xpath constraint in the reference selector. I have 2 entities in my domain, Klant (customer) and Order. I use a reference selector to select the account number of the customer (Klant entity) and insert it in my Order data grid. In the order entity a customer can have 3 enumerations In_behandeling (being treated, default value) goedgekeurd (approved) and afgekeurd (disapproved). The customer must only be selectable by the reference selector if his order status is 'In behandeling'. When i approve his status to Goedgekeurd (approved) or disapprove to Afgekeurd the selection of this account must disappear from the reference selector drop down selection menu. I wanted to do this by entering a xpath constraint in the reference selector. So i whent to the properties of the reference selector itself and at the box xpath constraint i entered: [MyFirstModule.OrderKlant/MyFirstModule.Order/Gegevensstatus='In_behandeling'] I don't get any error messages when i type this. But when i run it, the selection menu of the reference selector always stays empty, no matter what the status of the enumeration is. I hope someone can help me with this problem Kind regards, Peter Schakel
asked
1 answers
4

An XPath constraint is always executed on the database. If you change a status you will have to commit the object to reflect this in the reference selector.

In many cases it is possible to create reference sets that work in memory as well.

answered