5 Replies Latest reply on Feb 2, 2011 3:09 PM by philmodjunk

    Complex portal problem



      Complex portal problem


      I'm in the process of constructing a mockup and I'm having an issue with a 'drill down' portal displaying the proper related records. Here's a rundown of the pertinent relationships:

      Project --< Submission --< Assignment >-- Employee

      Assignment --< Time

      I have constructed a layout showing records from the Project table.  On this layout are 3 portals that are set up to auto-filter in order of relationship:

      - Submission
      - Assignment
      - Time

      Not sure if I can explain this but.. here's how it works:  Click on the first record in the Submission portal, a global field is set and the Assignment portal is filtered on that global, showing all Assignment records (e.g. Employee names) for selected Submission.  Works fine.  I have the same system set up at the Assignment level.  Click on an Assignment record and the Time portal auto-filters for all Time records linked to that Assignment. The filtering works, but the related Employee Name that is displayed is wrong.

      I don't think this is a relationship problem, because when I look at the Time table layout, the related data in the Employee::Name field is correct, it's just not displaying properly in the portal..

      Example with IDs:  
      -  Project01 has 1 Submission record:  Sub01
      -  Sub01 has 2 Assignment records:  Assign05 & Assign06
                -  Assign05 Employee is John Adams, Assign06 is George Washington
      -  Assign05 has 2 Time records, Assign06 has 1
      -  The Time portal filters by Assign ID properly (e.g. if I click on Assign05 in the Assignment portal, the Time portal auto-filters and displays 2 records ID'd as Assign05), but the Employee::Name is always George Washington

      I can try to provide more info if necessary. Thanks for your help!

        • 1. Re: Complex portal problem

          You'll need to restructure your relationships to link your tables more directly to projects, I think.

          First, let's see if I understand the details.

          Layout is based in Projects and you have 3 portals, one to Submission, Assignment and Time respectively.

          This is the part I need to confirm: You have a name field from employee located in the Time portal and it shows the wrong name?

          • 2. Re: Complex portal problem

            Yes that is all correct.

            • 3. Re: Complex portal problem

              Next level of detail:

              Projects::ProjectID = Submission::ProjectID
              Submission::SubmissionID = Assignments::SubmissionID
              Employee::EmployeeID = Assignments::EmployeeID
              Assignments::AssignmentID = Time::AssignmentID

              I had to play with this one a bit. Apparently, this use of a field from Employee evaluates from the context of the current project record. WHen you trace records starting from the project record, you have two employees related to projects. George Washington would then be the first of those two related employees and thus, that's what you see displayed.

              I found I could get the Employee name from the context of Time if I defined a calculation field in Time that simply returned Employee::Name. If I put that field in the Time portal, I saw the correct name associated with that time record.

              • 4. Re: Complex portal problem

                You rule Phil!

                I could have also solved this with a second Employee table occurrence:
                Time::EmployeeID = Employee2::EmployeeID

                But your solution seems 'cleaner' to me

                Thanks so much!

                • 5. Re: Complex portal problem

                  I thought of that approach too, but didn't see any value to having such an extra field in the Time table, though you could set it to look up the matching EmployeeID number for assignments.