1 Reply Latest reply on Mar 17, 2016 11:38 AM by FredG

    Create multiple records from a filtered portal

    FredG

      Working with Filemaker Pro 13.

       

      I have a table of jobs that need a contractor assigned to each one.  This table includes the address of the job and the type of service needed.

      I have a table of contractors and their related addresses and type of work that they do.

      When a new job is entered I need to find a contractor that lives in the state that the job is located AND provides the service type needed.

      I have a button on the job that creates a new record for Job Tracking.  On this layout is a filtered portal that shows all the contractors that live in the state and provide the service.  I have all of this working.

       

      Here is the issue, on each of the rows in that portal I want to be able to add tracking notes and other fields that are related to that contractor for the specific job.

       

      My thought was that when the button is clicked a script would run that would automatically create the related tracking records I need.  This is where I am having issues.  Can anyone assist?

       

      About me:  I am 3 months into learning Filemaker as my company hired an outside vendor to create a DB for our systems.  Now I am tasked with learning it, figuring out how the other company set things up and adding new functionality.

        • 1. Re: Create multiple records from a filtered portal
          FredG

          I actually figured this out!  It may not be the best way, but it works.

           

          The Jobs are in Table A and have a unique Job ID

           

          The solution was to make one layout (Layout A) that contained my filtered portal (Portal A).  In my script I looped through each row and stored each rows data into variables that were then copied to new records in a different table (Table B) that also had fields for tracking notes and the Job ID.  The Job ID in Table B relates to the Job ID in Table A

           

          Then I made a duplicate layout (Layout B) and instead of using the original portal, I used a new portal (Portal B) related to the new table.  This gives me all the contractors that live in the state that can preform the service and allows me to enter in tracking notes for each.

           

          I don't know if that makes sense or if its even the best way to do this, but it does what I need.  Reply to this if you need more clarification.