Which object is [CurrentObject] when using an Xpath constrained on a reference selector in a dataview?

5
I have a dataview with an orderline object attached to it. In the orderline dataview I have a reference selector to a product. I want to use Xpath to set a certain constrained on this product reference selector. When I make use of '[%CurrentObject%]' in this Xpath constrained is this '[%CurrentObject%]' the order object or product object?
asked
2 answers
7

The token [%CurrentObject] refers to the orderline object, because otherwise there is not a link possible in the XPath constraint between the products and the active orderline.

answered
7

When using the [%CurrentObject%] token in an XPath constraint of a widget (e.g. Reference Selector, Datagrid, Searchfield in Datagrid) it always refers to the object of the Dataview the widget is placed in.

The client will replace the token with the id of the object when the XPath query is executed.

answered