XPath constraint on a data grid with multiple objects linked

I've got the three entities project, task and account. Project is linked with multiple tasks and a task is linked to an account. Now I want to show a datagrid where you can only see the projects in which the current user has tasks. I'm finding this very hard to do, though. I tried [TimeSheets.Project_Task/TimeSheets.Task/TimeSheets.Task_Account = '[%CurrentUser%]'] as an XPath-constraint on the data grid, but this didn't work, and I can understand that, since there are multiple task objects within a project, so there is no single Task_Account object. Is there a way to make this work so that in the data grid you can only see projects which have tasks that are linked with your account?
1 answers

Are your associations correct? Sounds like you need:

Project 1 ----- * Task User 1 -------- * Task

If those are right, it should work fine. But judging from your constraint, you might have the ProjectTask association wrong. Try TaskProject :)

Your Xpath would be: [TimeSheets.TaskProject/TimeSheets.Task/TimeSheets.TaskAccount = '[%CurrentUser%]']