Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1189
  • Last Modified:

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?
0
PachecoPrimo
Asked:
PachecoPrimo
1 Solution
 
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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now