Exporting Formatted Text
When you use the Export command in FileMaker, you create a text file without any of the formatting specifications that you created in your layouts.With the addition of XML capabilities to FileMaker, it is possible to use XSLT style sheets to create formatted output files. Unfortunately, XML can be daunting and has a steep learning curve. But there is a simpler way that doesn't require a degree in computer science.Using calculation fields, you can embellish the raw data if you're exporting the text to a program like Quark XPress that supports formatting tags. Being able to control typographic setup when you export records can improve your communication with a designer who's using the material to create an annual report, or simply save your own precious time by not having to redefine basic hierarchies of information in a page-layout program.As an example of how to export Quark-style tags, we'll add tags to name and address fields to make the names bold and the addresses italic.
To include format tags in exported text
1 .In the file you want to export as formatted text, choose File > Define > Database (Control+ Shift+D/ Command+Shift+D).2 .In the Define Database dialog box, click the Fields tab. Type a field name (we use Formatted Name). Choose Calculation (Control+L/Command+L) in the Type drop-down list (Figure 11.34). Click Create.
Figure 11.34. You need a calculation to specify formatting tags.
[View full size image]

Figure 11.35. The < and > symbols can be found in the Operators list or they can be typed in.

Figure 11.36. Use the & button to connect different portions of a formula.

Figure 11.37. The comma and space must be inside the quotes.

Figure 11.38. In Quark Xpress, the second bold tag turns off the bold style.
[View full size image]

Figure 11.39. Save your edited changes by clicking Change.
[View full size image]

Figure 11.40. Change the bold tags to italic tags by editing the letter inside the angle brackets.

Figure 11.41. Select only the field name, then replace it with a different field.
[View full size image]

Figure 11.42. The completed formula replaces the formatting tags and fields with new ones.

To export formatted fields to a text file
1 .Once you have a calculation that adds format tags to your data, choose the records to export and sort them.2 .Choose File > Export Records.3 .In the Export Records to File dialog box, type a name for the export file. Click in the file Save as type/Type drop-down menu and choose Tab-Separated Text Files/Tab-Separated Text (Figure 11.43). Click Save.
Figure 11.43. Choose Tab-Separated Text as the file type to insert tabs between each field in the exported text.
[View full size image]

Figure 11.44. Specify the formatted fields, not the original ones, for export.

You now have a text file that you can import into Quark XPress just as you would any other text document. When you place the text in Quark, make sure that the Include Style Sheets option is checked (Figure 11.45).
Figure 11.45. Include Style Sheets will interpret the formatting tags properly when the text is placed in a Quark document.

Figure 11.46. This is how the imported text will look in Quark.
[View full size image]
