Saving, importing, and exporting data > Importing data into FileMaker Pro Advanced > Setting the import action and mapping fields during import
 

Setting the import action and mapping fields during import

When you import data into an existing FileMaker Pro Advanced file, the Import Field Mapping dialog box appears after you select the file or source of the data to import. Use this dialog box to specify the following import options:

Import action: Specify how to import the data into the existing file. You can add new records to the file, update existing records in the file, or update matching records in the file. See Importing data into FileMaker Pro Advanced.

Field mapping: Specify where to import the data by mapping the fields in your database to the fields in the source data that you’re importing.

You can import data from any field type into any compatible field except calculation fields and summary fields. You can only import into container fields if you're importing from another FileMaker Pro Advanced file or importing a folder of image files. When you import data into a global field, the last item imported into the field from the source file determines the global field value.

To set the import action and map fields during import:

1. If you have not done so, choose the file or source of the data to import into an existing FileMaker Pro Advanced file.

Follow the instructions in Importing data into an existing file, Importing a folder of files all at once, or Importing XML data. You will see the Import Field Mapping dialog box.

2. If you’re importing data from another FileMaker Pro Advanced file and that file contains multiple tables, choose the table you want to import from the Source list.

3. In the Import Action area, choose the type of import to perform.

Important  Updating existing or matching records overwrites data in the target file and cannot be undone. Choose File menu > Save a Copy As to make a backup copy of the target file. You can do this only for a local file (located on your computer). Make sure you understand how updating records works. See Importing data into FileMaker Pro Advanced.

 

To

Select

Add new records to the end of the target file

Add new records

Note  If the table you’re importing into contains no data, you can only select Add new records; the other options described below are not available because there is no data to update.

Update the found set of records in the target file with the records you're importing from the source, in order, starting with the first record in each file

Update existing records in found set

To also add any additional records in the source as new records in the target file, select Add remaining data as new records.

Update data in the target file with the data from matching records in the source

Update matching records in found set

To also add records from the source that do not have matching records in the target file, select Add remaining data as new records.

4. If the first record of the data you’re importing contains field names (column headings) instead of data, select Don’t import first record (contains field names).

Selecting Don’t import first record (contains field names) skips the first record during import.

5. For Target Fields, drag fields to align with fields or data in Source Fields, to indicate where source data will be imported or updated.

To align a field:

Windows: Move the pointer over the Double arrow icon icon next to a target field name in the list. When the pointer changes to a double arrow Double arrow pointer, drag the field to a new location.

macOS: Move the pointer over a target field name in the list. Drag the field to a new location.

You can do any of the following to align target fields and source fields:

To preview the data you’re importing, click Backward arrow or Forward arrow below the fields lists.

To create or change fields in the table you're importing into, click Manage Database. In the Manage Database dialog box, make your changes, then click OK. (If the button is dimmed, either you don't have sufficient access privileges, or the database is shared over a network and does not currently permit database changes. See Sharing and hosting files.)

To reorder the target fields all at once, choose one of the following options from the Arrange by menu:

 

Choose this option

To list the fields by

Matching names

Field names that match in both the target table and the source. FileMaker Pro Advanced matches field names dynamically each time you choose this option. (This option is not available when the source data does not contain field names.)

Last order

The order used the last time FileMaker Pro Advanced imported data into this table or the default order (creation order).

Creation order

The order in which the fields were created.

Field names

Alphabetical order.

Field types

Field type.

Custom import order

A custom order (which you create by dragging field names).

Note  Data from a source field will not import when:

The source field is not aligned with a target field. Drag a target field to align with each source field you want to import. Create a new target field if necessary.

The Cannot import icon symbol appears between the source and target fields, which indicates that the target field type does not support the source field data. You cannot import data into calculation or summary fields, or import some mismatched data types such as container data into a text field. (The Cannot import icon symbol may also indicate that access privileges do not permit importing data into a particular target field.)

Match fields in the target file cannot be container, summary, or unstored calculation fields. The field type of match fields should correspond to the type of data in the matching field. For example, number fields should not be matched to fields containing text.

6. In the space between each pair of fields in the list, click the field mapping symbol one or more times to indicate the field mapping you want performed.

Continue clicking until the symbol between the fields indicates the field mapping you want. For a description of each symbol, refer to the Field Mapping area. You can choose whether or not to import each field into the target field, or use a field pairing as a match field for updating matching records.

Tip  You can also set the field mapping for multiple fields at the same time. First select the target fields you want to change by holding down Ctrl (Windows) or Command (macOS), and clicking each target field. (You can also select a range of adjacent fields by clicking the first field and then Shift-clicking the last field in the range.) Then click a field mapping symbol for one of the selected fields until they all indicate the mapping that you want. (You can also press the Space bar one or more times to change the field mapping symbol.)

7. If necessary, for Character Set, choose the character encoding used in the source file.

The Character Set list may be dimmed or available:

If the list is dimmed, then FileMaker Pro Advanced was able to determine the encoding of the file and picked it automatically.

If the list is available, then FileMaker Pro Advanced was not able to determine the file encoding, and has tried to pick an appropriate character encoding based on your operating system and the file format you’re importing. You may need to change the encoding that FileMaker Pro Advanced picked. If you pick a different encoding, FileMaker Pro Advanced scans the import data, and will display an alert message if the data contains characters that are illegal in the character set you selected.

Note  If you’re importing a 16-bit Unicode (UTF-16) text file, the file must contain a Unicode standard Byte Order Mark (BOM). If the BOM is missing, FileMaker Pro Advanced will not properly recognize the file encoding.

8. Click Import.

You may see the Import Options dialog box, which appears when:

the target file has fields for which automatic data entry (auto-enter) options have been enabled

you’re importing and adding new records from a FileMaker Pro Advanced file with repeating fields

9. If the Import Options dialog box appears, select one or more of the following options, and then click Import.

 

To

Do this

Auto-enter new data in fields defined with auto-enter options. (For example, to enter the date in a Modification Date field.)

Select Perform auto-enter options while importing. Otherwise, auto-entered values will not be entered.

Note  When you’re importing into fields that are set to auto-enter a value (like modifier name, modification date or time, or lookup data), clear this option unless you want the auto-entered data to overwrite the data you’re importing.

Specify how to import data from repeating fields in the source file

Select:

Keeping them in the original record to maintain the field(s) as repeating fields.

Splitting them into separate records to import each repeating value into a separate record. (Use this option to work with individual values in repeating fields, such as to sort or summarize them.)
Note  When you split repeating field data into separate records any non-repeating fields that you import are duplicated in each separate record. For example, if a record in the source file has values in three repetitions, splitting them into separate records imports three records, each identical except for the values in the repeating fields.

Suppress validation checking of container field contents during importing, to allow the target file to use existing external container field contents

Select Preserve external container storage.

Use this option, for example, to quickly import data into a cloned copy of a file without having to decrypt and re-encrypt files to move container data to the target file.

The base directory of the source and target fields must be the same.

Note  If you’re importing a large amount of data, you may see an Importing dialog box that shows the progress of the import process. To stop importing, click Stop. Records that were already imported remain in the target file (the import is not reversed). To permanently delete the records already imported, choose Records menu > Delete All Records.

10. In the Import Records Summary dialog box, note the number of imported records and any data that was skipped. Then click OK.

The Import Records Summary dialog box displays three statistics detailing the imported records and any skipped data:

 

Statistic

Description

Total records added/updated

The total number of records added and updated in the target file during the import process.

Note  This number will include multiple updates of the same record if you’re updating matching records and more than one record in the source file matches a record in the found set of the target file. See the Notes section.

Total records skipped due to errors

The number of records in the target file that were skipped due to:

Privilege errors: Access privileges prohibit modifying one or more records.

Locked records: One or more records cannot be modified because they are being accessed elsewhere, either in another window by the same user or (if the file is shared) by other clients.

Validation errors: One or more records cannot be modified because record-level field validation requirements are not met, and the record could not be committed. See About validating data during import.

Total fields skipped due to errors

The number of fields in the target file that were skipped due to:

Validation errors: One or more fields cannot be imported because the data does not match the validation requirements defined for the field. See About validating data during import.

Privilege errors: Access privileges prohibit modifying one or more fields.

Skipped fields do not prevent the updating of other fields in the same record.

Notes 

The records you import become the found set. After importing, check the data in the found set. Choose Records menu > Show All Records.

If you’re updating records, be sure your records are correct before discarding the backup copy of the file.

If all specified match fields in a record are empty, that record will not be updated.

If a record in the source file matches more than one record in the target file, all matching records in the found set of the target file will be updated.

If more than one record in the source file matches a record in the found set of the target file, the target file will be updated with the last matching record in the source file. (During the import process, the matching record in the target file is actually updated multiple times—once by each matching record in the source file—so the last matching source record to update the matching target record determines its final content.)

The found set after an update contains the records that were updated (those that matched) and any new records added, regardless of the found set before update.