5 Replies Latest reply on Sep 19, 2016 11:44 AM by LabsRock

    Related portals

    jamestebb

      Hi

      I have a layout based on the table " courses"

      This has 2 portals

      The first shows student names from the table "contacts"

      The second shows students enrolled on the course from the table "studentspercourse"

       

      All works fine..

       

      I can click on the name in portal 1 and it gets added to portal 2.

      But how do I get portal 2 to show only contacts that are not enrolled?

        • 1. Re: Related portals
          breezer

          If you have a field that flags those not already enrolled, you can either use a new relationship based on primary key and the enrollment status field or simply filter the portal by the enrollment status field

          • 2. Re: Related portals
            jamestebb

            Thanks but not quite how it works.

            Students can enrol on various course 's

            So what I need to do is show contacts who do not have a record in the table students on courses where the course Id equals that of the current record

            • 3. Re: Related portals
              breezer

              it seems like you can then use the "not equal" as your relationship key instead of the "equal"

              • 4. Re: Related portals
                BillisSaved

                Good morning jamestebb,

                 

                I hope you had a wonderful weekend. I'd like to offer some assistance, if I can. Would it be possible for you to post an image of your relationship graph? Thanks and have a great day!

                 

                God bless,

                 

                 

                Bill

                • 5. Re: Related portals
                  LabsRock

                  One approach (I'm sure there are many) would be to use a calc field in the people table to get a list of ids for a persons registered courses.  Then use that field in your filter of the Contacts/People portal.  This is relatively straightforward, but you will need to incorporate some scripting to refresh the window and flush cached join results when adding or removing from your roster.  I've attached a sample file illustrating how this could work.  If you are planning for 10s of thousands of records and/or deploying over the WAN this might not be the best approach, but you might want to rethink the basic design if that is the case.

                   

                  I hope this helps.

                   

                  Craig