I would like to retrieve a list of Object A with matching attributes for object B. Here comes in the conditionality of the constraint; certain constraints only apply when these attributes are not empty in object B.
Solution (single attribute):
[ObjectA_B/ObjectB/Attribute = Attribute and ObjectA_B/ObjectB/Attribute != empty]]
Solution (multiple attributes):
[(ObjectA_B/ObjectB/Attribute1 = empty or (ObjectA_B/ObjectB/Attribute1 = Attribute1 and ObjectA_B/ObjectB/Attribute1 != empty))
and
(ObjectA_B/ObjectB/Attribute2 = empty or (ObjectA_B/ObjectB/Attribute2 = Attribute2 and ObjectA_B/ObjectB/Attribute2 != empty)
etc.]
Currently it's not possible to specify conditional xpath constraints. For now, you should use a microflow to open different forms with different xpath constraints.
[Attribute1 = empty or (Attribute1 != empty and ObjectA_B/ObjectB/Attribute1 = Attribute1)]