Cannot check constraining paths in reference selector

0
I am trying to constrain a reference selector by another reference selector on the page on the tab 'Selectable Objects'. In the documentation about reference selectors (https://docs.mendix.com/refguide/reference-selector) I found the following: A reference selector can be constrained by one or more paths. This is typically used to make one reference selector dependent on another. For example, in page where you can edit an order line, a product selector can be constrained by a category selector. After selecting a category, the product selector is constrained by this category and shows only products in the category. (...) The page has two reference selectors, one for category and one for product. The one for product is constrained by the path through the domain model that forms the triangle. Underneath is a dialog 'Select constraining paths' where you can check a path. In my app I can see 2 paths but I cannot check them. Am I doing something wrong?         
asked
3 answers
3

Hi Mieke,

Here is a quick example of how to constrain a reference selector by another reference selector.

 

This is the domain model I used. An order can reference only one category and one product. A category has multiple products associated to it, and a product can be associated to multiple categories. 

 

Here is the page that I used. I have a dataview of order with that has a reference selector for category and Product. 

 

I double clicked the reference selector for Product and changed the source to xpath, and constrained it by the association from order to category. 

 

Now when a user comes to this page, once they select a category, then the products drop down will only show products that are associated to that category. 

 

Hope this helps! And if you still have questions,edit your question with a picture of your domain model and page. 

 

 

 

Edit:

if the checkboxes aren’t next to the constraints sometimes they get hidden by the dialog box. If you expand it then they should be visible.

answered
0

Hi Austin,

Thanks a lot for your answer. Somehow I can't add an image of my domain model, but it looks the same as yours. I see two constraining paths, but I cannot select (check) them. I'll try the exact same example that you provided to see what happens.

Kind regards, Mieke

answered
0

Hi Austin,

It was missing. Once I expanded the column it became visible. Thanks a lot for your suggestion!

Kind regards, Mieke

answered