3 Replies Latest reply on May 31, 2012 1:34 PM by philmodjunk

    How to Import into Main Table and Related Table?



      How to Import into Main Table and Related Table?


      Hi all,

      I have a .CSV file of contact info along with the amount they donated.

      My main table is the contact info while the donation table is related.

      How can I import to both of these?

      The donation table is called CONTACTS to Donation_money.

      Thank you. 

        • 1. Re: How to Import into Main Table and Related Table?

          The basic method is to use Import Records twice from the same CSV file, You map the columns that match to fields in the contacts table and import, then repeat the process with the donation table, mapping to fields defined in that table. But you also need to create a value in both tables that links them to each other.

          Does the same contact appear more than once in this file? (Perhaps they are shown with more than one donation?)

          If it's just one contact per row with no duplications, there are some simple options for providing a serial number during the import process, but if some contacts are listed more than once, things get a lot stickier.

          In the latter case, you'll have to use the data in the CSV to construct a temporary value for uniquely identifying each contact. This can be done by setting up a field that auto-enters a combination of name, address, phone fields. You can then enable auto enter options during import and use a relationhip based on this field to update the donation records with the value of the matching contact record's serial number field. This method leaves you vulnerable to contact data that fails to match due to errors and variations in how the data was entered. (Maybe one record shows my name as "Phil" and another as "Phillip" or "Philip"....)

          If the data has an email address or tax payer ID field, however, you are in much better shape.

          Note that in FileMaker, you can define different relationships between these two tables by adding new occurrences of one of these tables (I'd use Donations) so you can have a relationship that matches by our temporary match field and one that matches by the serial number at the same time.

          • 2. Re: How to Import into Main Table and Related Table?

            I should elaborate more.  I have a contacts tab and then a donations tab.  The contacts tab is the main table and the donations tab is Contacts to Donations_money.  All these things are tied by a FileMaker ID# (think of it like a customer ID) and this is how we can keep the data all attached.


            For some reason it won't let me import directly into the Donations table.  It's all linked to the Contacts table.

            • 3. Re: How to Import into Main Table and Related Table?

              If you are selecting Import Records directly from the File Menu, you must first go to a layout based on the target table (Donations) before selecting this option from the menu.

              That fact that you have an ID# in your database is a good thing and I assumed that you had exactly that, but that won't inusure that the imported donations data will correctly link to records in contacts unless you develop a method to match them. What method works best for this will depend on what data you have in your CSV file.