Reference > Script steps reference > Fields script steps > Export Field Contents
 

Export Field Contents

Exports the contents of a single field in the active record to a new file.

See also 

Options 

Specify target field specifies the field to be exported. If no field is specified, FileMaker Pro Advanced exports the contents of the current field in the active table.

Specify output file specifies the name and location of the file to which the field contents will be exported. See Creating file paths. If no file is specified, the user is asked to choose a filename and location when the script step is performed.

You can select:

Automatically open file to have the output file open with the default application

Create email with file as attachment to display a new email message in the user’s default email application, with the output file attached

Create directories specifies whether to create new directories that you specify in the output file path.

Compatibility 

 

Product 

Supported 

FileMaker Pro Advanced 

Yes 

FileMaker Go 

Partial 

FileMaker WebDirect 

Partial 

FileMaker Server 

No 

FileMaker Cloud 

No 

FileMaker Data API 

No 

Custom Web Publishing 

No 

Runtime solution 

Yes 

Originated in 

FileMaker Pro 6.0 or earlier

Description 

If the contents of the exported field is text, then FileMaker creates a UTF-16 format text file. To convert the text to another format first, use the TextEncode function.

Notes 

In FileMaker WebDirect:

The Specify output file and Create directories options are not supported. FileMaker WebDirect exports field contents to the web browser’s default download location.

This script step is not supported in mobile browsers.

In FileMaker Go:

Text is exported as a UTF-8 format text file.

The Create directories option is not supported.

Example 1 

Opens a dialog box to set the export path with a new directory and a filename, then exports the image.

Export Field Contents [Products::Picture; "Mobile Phone.png"; Create directories: On]

Example 2 

Exports files from the Container field in all the records in the found set to a set file path.

Set Variable [$PATH; Value: Get ( DocumentsPath ) & Products::Container]
Go to Record/Request/Page [First]
Loop
Export Field Contents [Products::Container; "$PATH" ; Create directories: Off]
Go to Record/Request/Page [Next; Exit after last: On]
End Loop

Related topics 

Script steps reference (alphabetical list)

Script steps reference (category list)