Importing Data from Text Sources
Some files from other applications (like Microsoft Excel) can be imported into FileMaker without much fuss. But to import data from most programs, you need to create intermediate files in a format readable by both FileMaker and the original program. (See the sidebar "About Data File Types" on page 286, and refer to your software's documentation for instructions on exporting files.)Although text files are a universal output format, they don't usually contain field names. You have to determine field order either by looking at the data in the original program or by examining the data after you import it. Fortunately, FileMaker has a wonderful field-mapping feature right in the Import dialog box that allows you to match imported data to your existing FileMaker fields.
To import text data files
1 .With the database you want to import into open, choose File > Import Records > File.2 .When the Open File dialog box appears, choose the format of the exported file from the "Files of type" (Windows)/ "Show" (Mac) drop-down menu. Navigate to the file and double-click to import it (Figure 12.1).
Figure 12.1. When you choose a file type, only files of that type will appear in the Open File dialog box.
[View full size image]

Figure 12.2. If there are field names in the import file, they will appear as the data of the first record, although they may not match up with your fields on the right.

Figure 12.3. If there are no field names in the import file, you will see the data in the first record instead.

Figure 12.4. Drag the FileMaker field names up or down to correspond to the data that will be imported into them.

Figure 12.5. Indicate which fields to import with the arrows in the center column.

Figure 12.6. The navigation buttons let you see any records in the import file.

Figure 12.7. Define additional fields for data that don't match your current database. In this example, we need to add a second phone field.

Figure 12.8. You can have the imported data update any lookups or other auto-enter settings.

Figure 12.9. If the field names were imported with the data, delete that record.
[View full size image]

If the data in a file you're importing doesn't match your existing FileMaker structure, give the information a thorough looking over in a spreadsheet program like Excel before you continue. Spreadsheet programs display tab-delimited data in columns. Each column corresponds to a field and each row to a record (Figure 12.10). You can insert a row at the top of the spreadsheet to create field names, making the match-up process a little easier (Figure 12.11). You can also make global search-and-replace changes, then save the data as an Excel file to retain the field names when you import.
Figure 12.10. In a spreadsheet, columns are the fields and rows are the records.
[View full size image]

Figure 12.11. If you want to create field names in a spreadsheet, insert a row at the top and type the field names.
[View full size image]

Figure 12.12. The character set must match the operating system running the FileMaker database.

About Data File Types
Although FileMaker can import a variety of file types, the most common are text files. Not all word-processed document files are text filesin fact, most of them aren't. Text files are a special subset of files that contain only ASCII text. ASCII text contains only text, numbers, and basic punctuationno special characters and no font, format, or layout information. Because they're so simple, ASCII text files are readable on every type of computer, and virtually every application that works with data can produce text files. This universal readability makes text format the best choice for transferring data between different applications.Although text files can't contain real formatting, they can carry some special charactersline return and tab, as well as punctuation like commas that can be used to separate fields of datathat make them useful for data transfer as well as simple alphanumeric text. Most programs that support ASCII text as well as their own formatting have an option for saving files with these two important characters (Figure 12.13). Some programs call this file type "Tab-delimited text," whereas others use "Text Only with Line Breaks." ("Delimited text" is another name for letters and numbers with tabsor commasseparating the fields and returns separating the records.)
Figure 12.13. This Day-Timer database has the option of saving as an ASCII file.

Batch-Importing Guidelines
Although batch-importing is very easy, it can require some fancy mental footwork to be an elegant solution instead of a horrific muddle. Here are some important hints for importing multiple files:You can't generate a brand-new database from the contents of a folder. The database already has to exist and have fields available for the new content.All the items will be imported into the same field. Be sure to delete from the folder any files that belong in a different category.Text files must all be simple text-only files. They can't contain embedded images or charts. Any formatting (like font or point size) won't transfer.When you batch-import to update or replace data, records and incoming files have to match. If there are more files in a folder than there are records to hold them, the extra files will be ignored when the import takes place.Be very careful when batch-importing replacement files. Create a found set of the records whose data you'll be replacing, and make sure that it is sorted correctly for the incoming files.And most important: Unless it's a brand-new file, always make a backup of your database before you import, particularly if you'll be replacing or updating data, not just importing new files from scratch. The more material you import, the worse mess your file can become if you've overlooked something in your preparation.