$currentObject not the same as[%CurrentObject%]

2
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.
asked
4 answers
1

Hi Bart,

I can reproduce this. Looks like a platform bug.

answered
1

I will log a ticket then. Thanks for your reply Marius

answered
1

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.

answered
0

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

 

answered