4 Replies Latest reply on Aug 5, 2011 6:52 AM by LaRetta_1

    Filter Records in a set

    PeterDowns

      Title

      Filter Records in a set

      Post

      Hi

      I have a multiuser database where users enter projects. They go to the project layout and it shows them details of their projects. All good. 
      As part of a project their is a series of tasks  attached to it. You go to the tasks page by clicking a button to the task layout. 

      However at the tasks page it displays all the tasks for every project. Is there as way to pass a value ie ProjectID to the the task page so it only shows the tasks attached to the project value passed?

      The project table is linked to the tasks table by an ID field and it allows the creation or deletion of records via this relationship.

      Thanks in advance

      Cheers

      Peter

        • 1. Re: Filter Records in a set
          LaRetta_1

          Hi Peter,

          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.'

          • 2. Re: Filter Records in a set
            PeterDowns

            Hi

            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.

            Any ideas

            Cheers

            Peter

            • 3. Re: Filter Records in a set
              PeterDowns

              Hi

              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)

              Any Ideas
              Cheers

              Peter 

              • 4. Re: Filter Records in a set
                LaRetta_1

                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.