XPath - Cannot use CurrentObject in Constraint of Reference Selector
Hi, I am using Mendix Studio Pro 8.18.14. I have a dataview with datasource Entity A. Inside that dataview, I have a reference selector with ‘Select using’ as Page. On the tab ‘Selectable objects’, ‘Source’ is set to XPath. I would like to filter the objects from an associated entity (Entity B) wherein my condition is that its attribute should match an attribute of my dataview (Entity A). To do this, I need to supposedly use the dataview’s current object (Entity A). But the problem is that the use of ‘[%CurrentObject%]’ or $CurrentObject inside xpath constraint doesn’t work and not being recognized. I have also tried using Microflow as Source instead of XPath, but error message says the use of Microflow is only possible for Drop-down reference selector. I’ve been stuck for days already. Do anyone of you have an idea how to achieve this? Any enlightenment or response is very much appreciated.
Clarke Adrian Cañal
Hi Clarke Adrian Cañal,
For this use case I would put my own custom flow instead of using reference selector.
You can add a button which call a page having Parent as data view and a List Widget inside the data view with Data source as microflow .Keep an action button on the list widget and call a microflow which will set the association and then close the page.
I hope this will help you.
Is it also not possible to let entity B listen to entity A? In that case you always have the object of entity A.