Constraint by vs. xPath

2
To constrain the selectable objects of a ref. selector, you have to use Constraint By or custom XPath functionality. For new objects (they aren't commited in the database) you can only use Constraint By. Conclusion is that Constraint By use the client information about selected objects, while XPath doesn't. And now my problem. I have a object A and in it's dataview I want to select a B from a set of B where B is constraint by some association to A or where attribute x = true So I have to combine the XPath with the Constraint By functionality. And in this case that's impossible. It would be very nice if I can use attributes / relations of CurrentObject in XPath. E.g: [B_C = [CurrentObject]/A_C or x = true()] Unfortunately that isn't possible at the moment, so I am curious if anybody has some other ideas about this case. I don't like the solution to commit the A instance onchange of the A_C association. So every solution except that one is welcome :)
asked
1 answers
1

I found a solution and I haven't to commit the object. I use a datasource microflow for the selectable objects, and retrieve the C from association of A. After that I can do I database retrieve on B where B_C = the retrieved C instance.

Onchange of A_C I only have to do a refresh to trigger the datasource microflow.

I think this is the least dirty solution

answered