Filemaker 13 Export / Import Records

I have two databases (Source and Target). I am trying to export records from the Source database into the Target database. I start by using the 'Export Records' script step in the Source db, and temporarily place records in a temp path. Then I open up the Target db, using the same script, and choose the file that I saved under the temp path.
My questions are:
1. What is the best format for me to export the records from the source: Tab or xlsx?
2. When Importing, if I exported the file as a Tab delimited, the field names are not exported, so when I import, I cannot use the 'matching field names' category.

Any suggestion on a similar process?
PachecoPrimoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will LovingPresidentCommented:
The best way to do this is to bypass the intermediary file and do it as a single straight Import from Source into Target. You can setup the Import Records script step to know save the location of the Source file as well as the tables and fields to import from and import into (using matching names is generally safest).

If the location of the Source file changes, meaning it's not in the same folder or on a server, you can give the user the option to specify the location manually or use a plugin to give the user the opportunity to select the location of the Source file and then set that path to a $FilePath variable to be used by the Import Records scripts step. (There are many plugins that include this function; I use the Troi File Plugin.)

If there is some reason why you must use an intermediary file. The safest temporary file format to use is FileMaker Pro because retains all field names and formatting, allows export/import of container fields, and doesn't have the same issues with carriage returns within text fields that you will encounter with Tab, CSV, Merge or other formats.

Other than using a FileMaker Pro file, you can use either Excel (.xslx) or "Merge". The Merge file format is simply CSV (comma-separated values) with a header record containing the field names. This allows you to use the "Matching Fields" option to align fields between the two tables, as does Excel. However, Excel can sometimes alter data, such as treating Zip or Postal code field values as numbers and stripping off leading zeros, for example, "01002" for Amherst, MA becomes "1002". Tab is a very useful format but does not have the header record option.

Finally, if you export text fields containing carriage returns (within the field) to Tab, CSV or Merge format, your import will not go well. Since those file formats are "plain" or ASCII text format, the end of a record is designated by a carriage return or ASCII 13 character. Internally, within text fields, FileMaker uses an ASCII 11 (line feed) character to separate paragraphs, but when those fields get exported to plain text, those ASCII 11 Line Feeds become regular ASCII 13 carriage returns and signal - in the import - the start of a new record.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.