Currentobject in OR-statement breaks xpath

0
Goodmorning, We are trying to show a datagrid with object associated to an “eigenaar” object were the “eigenaar” is associated to the currentobject OR has a certain boolean. The Xpath looks like this: [Normering.Groep_Eigenaar/Normering.Eigenaar     [_IsKlantSpecifiek = false() or      Normering.Eigenaar_Klant = '[%CurrentObject%]' ]]   When we remove the second statement ( Normering.Eigenaar_Klant = '[%CurrentObject%]' ) then we get a list of objects, but when we add the second statement again we see no results. We dont understand because the first statement of the OR is True, therefore we expect a list of items. Note this only occurs when the currentobject is empty.   Can anyone explain why this is happening en maybe a viable workaround?
asked
2 answers
1

Did you try to do the same retrieve in a microflow? What is the outcome there?

You could also try to do two retrieves in a microflow. One with the _IsKlantSpecifiek = false()  and one with the  Normering.Eigenaar_Klant = '[%CurrentObject%]' and then do a union over that list.

I know that you don’t want to use a datasource microflow. But it may help to find the cause of the issue.

answered
0

Hi Nick,

See https://docs.mendix.com/releasenotes/studio-pro/8.18#fixes-1. There was a bug with CurrentObject in nested statements. Maybe also the case in your version?

Possibly remove the nesting in this case with acceptance of the performance drawback.

answered