Search code examples
csvimportfilemaker

importing CSV into FileMaker Pro 18 with CSV header line


Despite searching both Google and the documentation I can't figure this out:

I have a CSV file that has a header line, like this:

ID,Name,Street,City
1,John Doe,Main Street,Some City
2,Jane Done,Sideroad,Other City

Importing into FileMaker works well, except for two things:

  1. It imports the header line as a data set, so I get one row that has an ID of "ID", a Name of "Name", etc.
  2. It assigns the items to fields by order, including the default primary key, created date, etc. I have to manually re-assign them, which works but seems like work that could be avoided.

I would like it to understand that the header line is not a data set and that it could use the field names from the header line and match them to the field names in my FileMaker table.

How do I do that? Where is it explained?


Solution

  • When you import records, you have the option to select a record in the source file that contains field names (usually the first row). See #4 here.

    Once you have done that, you will get the option to map the fields automatically by matching names.

    If you're doing this periodically, it's best to script the action. A script will remember your choices, so you only need to do this once.