Conditional XPath Constraint

0
HI I have the following scenario: Page based an Order entity with a very basic state model: Type with a 1:M association with Status Status with a 1:M association with Reason Status and Reason are exposed as reference selectors on the Order page. I’ve successfully constrained Status (Type is “Order”), but I’d like to further constrain Reason based on Status.   I’m thrashing with XPath syntax: To constrain Status, I’m using: [Common.State_Type/Common.Type/TypeName = 'ORDER'] --- works fine. Per the link recommended by Ronald (https://docs.mendix.com/refguide/reference-selector#constrained-by), I think the correct XPath for Reason should be: [Order.Order_State/Common.State/Common.Reason_State/Common.Reason] The problem I’m running into is this: For the Status XPath value, the Order.Order_State association is visible in the XPath editor. But for the Reason XPath value, Order.Order_State is NOT visible (only the associations for Reason). All my associations use default ownership and they work in the pages where I maintain Type, Status and Reason picklist values. Solution For anyone who might be running into a similar problem – note that the list of Constrained By paths (listed in the Answer / Comments below) has 2 columns and the left-most column (in my setup) was too narrow, so the checkbox was not visible. Using the Constrained By paths works perfectly.
asked
1 answers
3

See the documentation here of the Constrained By function

https://docs.mendix.com/refguide/reference-selector#constrained-by

Regards,

Ronald

 

answered