There seems to be many who have asked similar questions but despite reading the threads I do not get my XPath to work.. My Domain Model: Within the entity tasks I have a page to create new tasks where I need to access Building_number and Room_number. Starting with Building_number I am trying to write an XPath without much success. What I want is all buildings in the database to be viewed in the reference selector. Since I am not familiar with how it works I also tried going the full way over every association and entity but it also gives me the same errors as above that this association from room to building is not found: [MyFirstModule.Task_Room/MyFirstModule.Room/MyFirstModule.Room_Building/MyFirstModule.Building/Building_number] Thanks in advance! All input is appreciated!
You should remove the part of Building_number, since that is an attribute rather than an entity. Easiest is to use Mendix's autocomplete suggestions when making an Xpath (add the “[“ bracket and then press ctrl + space).
What exactly do you want to show in the reference selector, though? You say you want to show all buildings in the database, but for that you don't need to fill out an Xpath. Just fill out the correct data source on the “general” tab (the “attribute (path)” part, and on the selectable objects tab, set it to “database”. That should get the job done.