Importing Data Into Filemaker Explored ( part 2 )

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

This is the second part of a two part discussion on importing data into a FileMaker table.

Here we can see the import field mapping dialog for a FileMaker file. This allows you to see the field names on the left side. You can also use the View By Matching Field names option in the upper right for quicker import field mapping setup.

In the lower left corner, you can see your import action settings. This area consists of 3 radio button options and the last option has an associated check box. These often overlooked settings can be as important as the import field mapping area.

Add New Records - When the records are imported, new records are created in the destination file. So if you have 50 records in the source file, you will have 50 additional records in the destination file once the import is complete.

Replace Data In Current Found Set - This means that you have a found set of records in the destination table and you want to update the data in some of the fields with imported values. So you may have a table with 6 fields and just one of those fields you want to update with data from an external source file. You know the order of the records in your destination table matches the order in your source file. So if you have 50 records in the destination file and your import source has 50 records. All the data in the source file will update the fields you specified for the destination file. The fields you did not specify in the import field mapping area are unchanged.

In some cases, the number of found set of records in one file does not match the number of records in the other file. In the case that there are more records in the source file, the additional records that could be imported are disregarded. That is to say if the source file has 75 records and you only have 50 records in the found set of the destination file ... the last 25 records in the source file are not imported. In some cases, the source file may not have as many records as the found set in the destination file. In cases like this, FileMaker does show you a dialog box stating this ... just so that you will know.

This is the dialog box that can show up when using the Replace Data In Current Found Set option. This dialog tells the user that the source file has more records to import than the current found set in the destination file.

This is the dialog box can show up when using the Replace Data In Current Found Set option. This dialog tells the user that the source file has less records to import than the current found set in the destination file.

The Update Matching Records In Current Found Set option is a variation of the Replace Data In The Current Found Set option and can be used as part of an import synchronization process. The variation lies in the ability of FileMaker to update only the records in the destination table that have a match from the source table. How does it know the records are a match? You define what fields are the match criteria right from the import dialog box.

So when a record in the import (source) matches a record in the destination table, the record in the destination table is updated. To set a field as a match field, click the area between the two fields in the import mapping dialog box until the double arrow icon appears there.

Along with the Update Matching Records In Current Found Set is a check box to Add Remaining Records. When this is checked, any non-matching records from the source table are added as new records in the destination table.

Here is another look at the import dialog box if you want to update the found set via a matching field.
=
More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2008 - Dwayne Wright - dwaynewright.com

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.