Check out the Go To Related Record script step. If the tables are related on ProjectID and you are on Project layout, GTRR to Tasks will only produce a found set of related tasks for that Project - see options within the script step and select 'match current record only.'
thanks for the advice, set up related record set and it seemed to work well. However slight teething issues:
I have 3 projects, Project A has 5 related tasks and when I click to go to the task layout it filters and displays the correct tasks plus 1 task from project B. If I return to the projects layout and pick project B (has 3 related tasks) and then click to go through to the tasks layout it shows the the last task on the list that is related to project C. If I select Project C and click on the tasks (should be 2 related tasks) it won't click through to the tasks layout at all as if there are no tasks at all??
The table projects is related to the table tasks by an id field that allows records to be created and deleted in the task table by this relationship.
The button to go to the tasks layout (which is on the Projects layout has the following script attached -
Go to Related Record [Show only related records; From table: "Tasks"; Using layout: "Record Detail - Tasks A (Tasks)]
I have checked the database tables Project A has an ID value set at 1, Project B ID field value 2, Project C has an ID field value of 4. The corresponding tasks for all contain the correct related ID values from their respective projects.
as a further note to above there is nothing in the data that ties these records together apart from task ID. And for example in Project A it has 5 related tasks with the correct ID and an extra task with a different ID.
Please (I know it will probably be something stupid)
We will need to see the file, Peter. This forum doesn't accept attachments. Can you create an empty clone (File > Save A Copy As > Save a Clone (no records). Upload it to a free site such as 4shared.com then paste the link to it here.
If you are concerned about privacy, you can message me and I'll provide my email and review the file privately. But the discussion about what we find should be brought back here so that others reading this thread will know how it is resolved.