databaseexportusingformula
TEXTFILE
,
FORMAT
,
FORMULA
,
TITLES
,
ENCODING

The databaseexportusingformula statement exports selected records in the current database to a text file, using a formula.


Parameters

This statement has five parameters:

textfile – path and name of text file.

format – format to export in. This must be either CR, LF, CRLF, or HTML. If left blank, LF is the default.

formula – formula to be used to arrange the export. This formula must be quoted. If the format is HTML then this is actually a template and not just a formula, see the HTMLDataTable statement for details about the template format.

titles – optional title line to be included as a prefix to the export.

encoding – optional encoding for the export. If "" (or ommitted entirely) the encoding defaults to UTF8. See the texttobinary( function for a list of available encodings.


Description

This statement exports selected records in the current database in a custom format to a text file. Here is an example that exports the selected records to a file named Mailing List.txt.

databaseexportusingformula "~/Dropbox/MailingList.txt","LF",
    |||FirstName+" "+LastName+tab()+Address+tab()+upper(City)+", "+State+" "+Zip|||,
    "Name"+tab()+"Address"

Note: This statement is used by the Text Export wizard when recording exports.


See Also


History

VersionStatusNotes
10.0NewNew in this version.