databaseexportusingformula
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 UTF–8. 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

- csvexportline( -- generates a comma delimited line of data containing all the fields in the current record.
- csvexportlinevisiblecells( -- generates a comma delimited line of data containing all the visible (non hidden) fields in the current record.
- csvquoted( -- adds quotes if necessary for CSV text (RFC 4180).
- databaseexportcsv -- exports selected records in the current database in CSV format (comma separated) to a text file.
- databaseexporttsv -- exports selected records in the current database in TSV format (tab separated) to a text file.
- downloadpartialdatabase -- downloads specified components of the current database from the server. The current database must be shared.
- export -- exports the selected rows in the current database into a text file.
- HTML Export -- custom exports into an HTML file.
- savepartialdatabase -- saves specified components of the current database, leaving other components out.
- Text Export -- exporting a database into a text or HTML file.
- Text Export Wizard -- custom exports into a text or HTML file.
- tsvtocsv( -- converts tab separated text into comma separated text.
- tsvtojson( -- converts tab separated text into JSON formatted text.

History

Version | Status | Notes
10.0 | New | New in this version.