1 Reply Latest reply on Sep 21, 2010 5:00 AM by sunmoonstar.13

    Table to Table

    CharlesGoings

      Title

      Table to Table

      Post

      I have two tables one is a client table with all pertinent fields and the second is a completerecords table what I am trying to do is have the information once it is entered into the first layout (the client layout) that it will also post to the completerecords table. 

      I have same schema including housekeeping in both fields, the completerecords table has one extra field called recordupdate_id so that no matter how many changes are made we still have copies of the original and every update done to each record. I have made the relationship and made it where each record can be created via the relationship in both directions. yet I am not getting any records in the completerecords table at all.

      So can anyone tell me what I am doing wrong or how to fix this situation so that it will always copy the records over to the completerecords table?

      I am using Filemaker Pro 11 Advanced.

      Thanks

      Charles

        • 1. Re: Table to Table
          sunmoonstar.13

          > I have made the relationship and made it where each record can be created via the relationship in both directions. yet I am not getting any records in the completerecords table at all.

          It won't happen automatically just because you've set up a relationship. You need to create a script that will compare the current data in the Client record with the last saved record in the Data_Complete table, and if the data has been modified, then a new related record is created in the Data_Complete table and the modified data is then copied into it.

          This can be implemented with a script trigger, so that when the user exits the Client layout, the script automatically checks to see if the data has been modified, and if so, it then creates a new record in the Data_Complete table and copies the modified data across (using variables). No interaction from the user is needed, it just happens automatically in the background whenever the user exits the layout.

          Here's a sample database that illustrates the idea:

           

          http://www.4shared.com/file/2a-ddsoB/Client_Data_Complete.html
           

           

          The "Save record..." script is attached to the Client layout as a script trigger - OnLayoutExit.

          The comparison between the current Client record and the last saved record in the Data_Complete table is done with variables and the List function.

          Hope this helps!

           

          Nick