Database Reference
In-Depth Information
POWER USERS' CLINIC: 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 your hard work good-
bye 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 in-
formation 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 col-
ors. 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 need to create a calculation field with a formula
something like this:
GetAsCSS ( First Name )
You 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 an
SVG image. You'll learn more about this option at the end of this chapter.
NOTE
Usually, if you just want to export records from one FileMaker file to another, you don't have to
export them first. Just go to the database where you want the data to end up and then import it
directly (described next). Of course, if one database is in South Africa and the other is in Tibet,
then by all means export them first.
▪ For the ultimate in flexibility, choose XML —the un-format. When you export XML, you
get to apply something called an XSLT style sheet. An XSLT style sheet is a document
written in a programming language all its own that tells FileMaker exactly how the ex-
ported data looks. If you need to produce an export format that FileMaker doesn't sup-
Search WWH ::




Custom Search