Script Steps Reference

Table Of Contents
Records script steps
F
ILEMAKER PRO SCRIPT STEPS REFERENCE 131
Originated in
FileMaker Pro 6.0 or earlier
Description
You can set the export order before adding this script step, or perform the step with a dialog box so
a user can set new criteria. Export Records exports all the records currently being browsed. If you
want to limit the set of records you're exporting, use a
find request before using Export Records.
If you include this script step in a server-side script and you do not set With dialog to Off, the text
(NOT compatible) appears in the script step. The script, however, will run. The behavior will be the
same as if With dialog is Off. See Get(DocumentsPathListing) function for more information.
Notes
When using the Export Records script step or Import Records script step in a server-side
script, keep the following in mind:
Any specified file must be in the FileMaker Server Documents folder, the temporary
folder, or a child folder of either the FileMaker
Server Documents folder or the
temporary folder. For example, the following are all valid paths for file.csv:
<Documents>/file.csv
<Temporary Path>/file.csv
<Documents>/Folder1/file.csv
<Temporary Path>/Folder1/Folder2/Folder3/Folder4/file.csv
Any path specified that isn’t a complete path to the file (for example, anything other than
/Library/FileMaker Server/Data/Documents/<0 or more directories>/<filename> ) is
evaluated as being relative to the temporary path.
Any paths that include “..” are considered invalid.
Export to .fmp12 is not supported.
In FileMaker Go, exporting to .fmp12 and XML formats is not supported.
When using this script step in FileMaker WebDirect, keep the following in mind:
FileMaker WebDirect does not support this script step in mobile browsers.
FileMaker WebDirect does not support exporting to .fmp12, XML, or Excel formats.
If the Specify output file option is selected, FileMaker WebDirect outputs exported
records with the specified filename and file type but ignores the specified file path.
FileMaker WebDirect outputs exported records to the web browser’s default download
location.
If field data or record data is too long for the export format, the Get(LastError) function
returns 0 rather than 736.
Example 1
Finds and sorts records, then exports the found set as an Excel file without prompting the user.
Go to Layout ["Invoices"]
Perform Find [Restore]
Sort Records [Restore; With dialog: Off]
Export Records [With dialog: Off; "Unpaid Invoice List.xlsx"; Unicode
(UTF-16)]