I have a list view in a dataview. The list view is only visible in case $currentObject != empty. I then use the $currentObject in the XPATH to get data for the list view, but for some reason it is always empty, or at least it always sends something like ‘where someEntity = NULL” to the database from what I can see in the logs. It drove me crazy to understand what was going on, and I still do not know to be honest. I then used '[%CurrentObject%]' in the XPATH and it just started working. What am I missing or could this just be a bug in the platform given the $currentObject was only added recently.
I can reproduce this. Looks like a platform bug.
Marius van der Knaap
I will log a ticket then. Thanks for your reply Marius
I was finally able to reproduce this one. If you use $currentObject/some_association in combination with the pagination widget from list view controls it will never return results.
I created a test project and logged a ticket with Mendix support.
As far as I know $currentobject isn't available in Xpath at all. '[currentObject%]' contains the id of the enclossing dataview. $Variables are only available in page expressions. In microflows and nanoflows these can be also used in XPath