When exporting data, you always create a file, but you get to decide what format the file should be. In the last example, you exported your data to a Comma-Separated Text file. This example is one of the many file formats FileMaker can produce when it exports. Most formats exist simply because computer software has put forth a lot of standards in the last 50 years, and FileMaker wants to be as flexible as possible. Some formats do have unique advantages, though.
The first question you need to ask is, "Where is the data going?" Your export format choice almost always depends on what the person you're sending it to needs, and most of the available formats are uncommon types you only use if the person on the other end asks for it. These include SYLK, DBF, DIF, WKS, and BASIC.
The remaining formats are explained below:
|UP TO SPEED
Where's My Style?
Most of FileMaker's export formats are text based. In other words, what gets produced is just a normal plain text file. The structure of this file determines which format it is, but you can open them all in Notepad or TextEdit and read them directly. A side effect of this reality is that none of them support styles. In other words, if you go to great lengths to change the first names in all your records so the font matches the customer's personality, you can kiss you hard work goodbye when you export.
In addition to the font, you lose the size, style, and color of the text. The notable exception to this rule is the FileMaker Pro format. Since this export format creates another FileMaker Pro database, all the formatting you painstakingly put in place is preserved.
If you must have text styles in your exported data, there is an option, but it ain't pretty. FileMaker has two calculation functions designed to aid this process: GetAsCSS and GetAsSVG.
Each function takes a single text parameter and returns a snippet of ordinary text with style information embedded using special tags. GetAsCSS produces text that can be put on a Web page. When viewed in a Web browser, the text takes on its original fonts, sizes, styles, and colors. GetAsSVG works the same way, but uses a different tagging scheme: the one used in the SVG, or Scalable Vector Graphics format.
To take advantage of these functions, you'd need to create a calculation field with a formula something like this:
GetAsCSS ( First Name )
You would then export this field instead of the First Name field. If you do this with the HTML Table export format, you get properly formatted text on your Web page. More realistically, you'd use these along with the XML format and a special XSLT style sheet that produces a Web page or SVG image. You'll learn more about this option at the end of this chapter.
17.2.1. Save/Send Records As
After wading through the technical details about FileMaker's amazing flexibility in exporting to practically any format you might need, the following two export types should give you some breathing room. Forget about arcane formatting rules and settle into more familiar territory. Gone too, is the need to specify a field order for export. The File images/U2192.jpg border=0> Save/Send command lets you choose between an Excel spreadsheet and a PDF (Portable Document Format) document. Both commands grab whatever fields are on the current layout and whip them and their data into the shape you choose.
If people need to work with the data you send them, but they aren't lucky enough to have FileMaker, you can create an Excel file for them, as shown in Figure 17-3. Once you've sent the file, they're free to do anything to the data that Excel allows make a table, create a chart, or run totals and summaries.
The Save option is a pop-up menu that lets you choose between the "Records being browsed" or the "Current Record" so you don't even have to do a find if all you want to do is send the current record. Like the other formats under the Export menu, you have the option to "Automatically open file" and "Create email with file as attachment," so it's easy to check your work and create a quick email with the data your boss just asked to email her.
If you click Options, you can set up some basic details for your new Excel file. For example, you can choose whether you want your FileMaker field names put in the first row of the spreadsheet. You can also type in a file name and a title, subject, and author (which appear in the Properties dialog box).
220.127.116.11. Portable Document Format (PDF)
PDF files are viewable by just about anybody with a computer. With PDF files, you get to choose exactly how the data looks, since this format preserves your beautifully crafted layouts. With FileMaker's layout tools, your keen design sense and the Save/Send Record as PDF command, you could use email to distribute invoices, product catalogs, sales brochures, or annual reports. You can even send vision impaired people a file their software can read out loud. Even if all you need to do is send people data they can see, but can't change, then a PDF file is just what the software engineer ordered.
|FREQUENTLY ASKED QUESTION
Making It Fit
A lot of FileMaker's Export formats use special characters for important things. For instance, the Tab-Separated Text format uses a return character to separate records. What happens if I have a return character in my field?
Good question! Special characters are one of those problems with no ideal solution. But FileMaker does the best it can within the limitations of each export file type. For a file to be called Tab-Separated Text, for example, you simply can't have return characters inside records. It's just against the rules. In this particular case, FileMaker turns the return character into something else, called a vertical tab, which is a standard but rarely-used character left over from when computers had green screens. Presumably, you don't have any of these in your fields (you can't type them, so it is a pretty safe bet you don't), so it's easy enough to turn vertical tab characters back into return characters when you open the file in another program. In fact, that's exactly what happens when you import a Tab-Separated Text file into FileMaker.
Another character of concern is the quote mark. If you have these in your fields, and you export a Comma-Separated Text file, FileMaker has to do something with them so they don't interfere with the quotes around field values. In this case, FileMaker turns your quote mark into two quote marks together.
That doesn't sound like a solution, but it is. If you assume any quote mark that is immediately followed by a second one is really just data, and not the end quote mark for a field value, you can figure out which is which in the export file. Most programs that support Comma-Separated Text understand this convention. (You might think commas would also be a problem with Comma-Separated Text, but they're not. Since every field value is in quotes, commas are OK. Only the commas between quoted values are considered field separators.)
The HTML and XML formats have all kinds of special characters, but each has a special "entity" form that's used if they're supposed to be treated as ordinary data. FileMaker converts any such characters appropriately, and every program that processes these formats understands the conventions.
Finally, FileMaker has a data-structure concept that most formats simply don't understand: repeating fields. The idea that one field could hold several values is foreign to most database programs. When you export repeating fields, FileMaker pulls another freaky character out of its hat: It separates each value with a character called the Group Separator. Thankfully, this action is almost never a problem because you generally don't export repeating field data to a file that needs to be read by a program that doesn't understand repeating fields. One last note: The FileMaker Pro export format obviously does directly support repeating fields.
The basic choices are the same as for Excel. You choose between sending just the current record or the whole found set. You can have the file opened in a PDF viewer or attached to a new, blank email just as soon as FileMaker's created it. But the PDF Option set is much richer. There are three tabsDocument, Security and Initial View. Starting with the Document tab, you can set:
In the Security Tab, you can decide how much access you give your recipients when they receive your file. You can choose:
The final tab in the PDF Options window is probably be the one you'll use the least. But if you like to control which PDF viewer options are visible when your recipient first opens your PDF file, then Initial View is the panel for you:
Part I: Introduction to FileMaker Pro
Your First Database
Organizing and Editing Records
Building a New Database
Part II: Layout Basics
Advanced Layouts and Reports
Part III: Multiple Tables and Relationships
Multiple Tables and Relationships
Advanced Relationship Techniques
Part IV: Calculations
Introduction to Calculations
Calculations and Data Types
Part V: Scripting
Part VI: Security and Integration
Exporting and Importing
Sharing Your Database
Part VII: Appendixes
Appendix A. Getting Help