2 Replies Latest reply on Jul 30, 2015 3:42 PM by ChrisSweet

    Create a list by manually selecting from another list

    ChrisSweet

      Hi

       

      Not sure where to start with this one. I have a table which contains records of Team Leaders

       

      I want to be able to show all the team leaders and select some of them to run a Find.

       

      Should I be looking at 2 portals, one showing the original list and the other showing the selected list (initially empty). If so would I click a row in the first portal and somehow remove that record and add it to the second portal ?  It would be great to be able to do the reverse as well in case of a bad selection.

       

      After all this is done would I then read through the selected portal records and translate them into a list ?

       

      I've done this before in Visual Foxpro but not sure how to do it with Filemaker.

       

      Any hints gratefully accepted..

       

      TIA

      Chris

        • 1. Re: Create a list by manually selecting from another list
          erolst

          If you want to use two portals:

          • create a Cartesian relationship to a new TeamLeaders TO

          • create a (global) text field

          • create a relationship to another new TeamLeaders TO that is based on the new field

          (Or use the existing Cartesian relationship and filter it.)

          • place both portals on the layout

          • write a script that adds/remove the ID (primary key) of the clicked Cartesian TeamLeader ID to/from the new field

          • attach the script to a field in the Cartesian portal

           

          This field is your selection list. Don't forget to clear it after you've done something with it.

           

          Another method, using a single portal and a variable:

          • create a Cartesian relationship to a new TeamLeaders TO

          • write a script that adds/remove the ID (primary key) of the clicked Cartesian TeamLeader ID to/from a $$globalVar

          • attach the script to a field in the Cartesian portal

          • conditionally format a field in the portal to denote a selection, based on the $$globalVar (requires a refresh)


          The $$globalVar is your selection list. Don't forget to clear/delete it it after you've done something with it.


          Actually, here is an example: go to the Orchards layout and click “New Inspection”; there you can see a single Cartesian portal and a $$globalVar in action.

          • 2. Re: Create a list by manually selecting from another list
            ChrisSweet

            Thanks for your reply

             

             

            I didn't fully understand it all but will work through it and compare to your sample. It's always good to see things in action and get different opinions.

             

             

            Thanks again.