3 Replies Latest reply on Nov 21, 2011 9:00 AM by joelande

    Nesting Related Portals



      Nesting Related Portals


      I have a layout showing records from a data base, Teachers.


      On that layout I have a portal listing records from a related data base, TrainingSchedule (TrainingSchedule is related to Teachers).

      I have another portal listing records that are related to the TrainingSchedule data base, TrainingItems.


      For any teacher, they may have multiple training schedules set, and at each of those training schedule sessions, they may get instructed on several topics (items).


      What I would like to happen is that when a portal row from the TrainingSchedule portal is selected, the TrainingItems portal would display the items related to the selected portal record (its related training items).


      Right now what is happening is the TrainingItems portal only lists the first related record found - it does not change when selecting a different portal row from the TrainingSchedule portal.

        • 1. Re: Nesting Related Portals

          Sounds like you need something more like a conditional value list.  A search in the forum here should have some instructions on how to set that up a link to a demo.  I remember downloading the demo, but not exactly which thread it was in.

          • 2. Re: Nesting Related Portals

            You have two options to do what you want. Sticking with your current design for option 1:

            Add a portal filter to your TrainingItems based portal:

            $$ScheduleID = TrainingItems::ScheduleID

            Where ScheduleID is a serial number field set up as the primary key for TrainingSchedule and used to link all your TrainingItems records to a specific training Schedule record.

            Add a button to your TrainingSchedule portal, format all the fields as a single button or set up script triggers on these fields to run this script:

            Set Variable [$$ScheduleID ; value: TrainingSchedule::ScheduleID ]
            Refresh Window [flush cached join results]

            You can also set up a conditional format with:

            $$ScheduleID = TrainingSchedule::ScheduleID

            To specify a fill color for your fields to highlight the training Schedule portal row to show which one is currently selected to show the contents of the detail portal.

            Option 2:

            Set up a list view layout listing your training schedule records with fields from the Teachers table included in header, grand summary and/or sub summary layout parts. Put a portal to the TrainingItems table in the body of the report.

            • 3. Re: Nesting Related Portals

              I used Option 1.

              Works pretty well.

              Maybe not totally obvious to end users, but it works.