If I understand correctly your current object would be the Project. You placed the grid inside the dataview_project, how did you link the grid?
Screenshots ?
Normaly you would constrain a grid representing a "subordinate" by going to that object trough the relations. In your case I assume you link the grid to the object and are trying to constrain the resulting query result.
When making the constraint, remeber that you are constraining the RESULTS so you are looking outside-in, not inside out.
Domain like this ?
So, Project-Work (1-many) and Work-PersonWorkWeek (1-many) are your relations right?
Then a dataview with Project, filled with a datagrid with PersonWorkWeek and the following Xpath should do the trick:
[Module.PersonWorkWeek-Work/Module.Work/Module.Work-Project = '[%CurrentObject%]']
The model is a bit different:
Project-Work (1-many) and
PersonWorkWeek-Work (1-many).
I tried to do what Bram wrote below, but I'm not getting the option to choose '[%CurrentObject%]'.
[Module.PersonWorkWeek-Work/Module.Work/Module.Work-Project = '[%CurrentObject%]']
In this case your best bet is to set a relation between Project and PersonWorkWeek. Set this relation when both Project-Work and PersonWorkWeek-Work exist for the same Work object. You can now show the relation Project-PersonWorkWeek in the datagrid you intented.
Hi Lex, Bram,
Thanks for helping me. In the end, the problem only was that '[%CurrentObject%]' is not in the dropdown of the autocomplete and I, therefore, thought that I couldn't use it. Mistyping didn't help. It's simply working as expected.
Now I am able to filter the PersonWorkWeek records based on the fact that the Work record is related to the Project. Here is the model again.
Project-Work (1-many) and
PersonWorkWeek-Work (1-many).
And, as Bram already suggested, this is the working filter:
[Module.PersonWorkWeek-Work/Module.Work/Module.Work-Project = '[%CurrentObject%]']