Creating a custom app > About choosing a field type > About container fields
 

About container fields

Use container fields to store:

photos, movies, sounds

documents, including Microsoft Word and Excel files, PDF files, and so on

You can reference container fields in calculation formulas or summary fields.

Data in container fields is by default embedded. You can, instead:

store a reference in the field when you select a file to insert into it (see Using data in container fields)

define the field to store data externally (see below)

You can make a container field interactive to optimize the field for content such as audio, video, or PDF files. See Specifying formats for container fields.

When you save a FileMaker Pro Advanced file as a self-contained copy, container data that is stored as a file reference, as well as externally stored data, is embedded in container fields in the copy. See Saving and copying files.

You can use the GetContainerAttribute function to track how the contents of a container field are stored and how much storage space it uses. This function also returns metadata about a container field's contents, such as the height and width of images, photo orientation, cover art of audio contents, bar code type, and signature timestamps.

Storing container data externally

Store container data externally to:

share data easily: storing data externally makes sharing a multiuser database easy, because each user works with data that's stored in one central location. You do not need to configure a shared volume on each local computer to use container fields in a multiuser environment. You can insert files into container fields from your hard drive without having to copy them to a shared volume first.

For example, a shared Products database includes a container field for product photos. When a user in one location inserts a file into the container field, the file is transferred to and stored in a folder on the host computer. When users in other locations view database records, the product photo is displayed in their copy of the container field.

perform incremental backups: Only a reference to an external file is stored inside the database, which keeps databases small and facilitates incremental backups. Storing container data externally promotes faster backups, because after an initial backup has been performed, subsequent backups copy only the external files that were added or changed.

choose how data is stored: Your data remains protected by FileMaker Pro Advanced. Container data that's stored externally in secure storage is by default encrypted and can be read by FileMaker Pro Advanced using secure storage. Alternatively, you can choose to keep the data in its native format (through open storage), giving you more control over how folders and files are organized in the external file system.

See Setting up container fields to store data externally.

Important  Routine backups are strongly recommended for any document stored on a computer. See Maintaining and recovering FileMaker Pro Advanced databases.

Notes 

You can't find or sort records based on a container field, but you can define a text field to describe or identify the contents of the container. Then, you can find or sort records based on the information in the text field.

To specify how data in a container field displays (for example, whether the image is cropped or scaled), see Formatting and setting up field objects in Layout mode.

To put a static graphic (like a logo) on a layout, create, paste, or import the graphic directly onto the layout, or use a global container field. Either option will use less storage space than storing the same graphic with every record.

You can create a script that includes the Insert File script step to specify the contents of a container field.

By default, FileMaker Pro Advanced saves externally stored container data in the same folder in which the database file is located. To change the location, see Managing external storage of container data.

When you define a container field to hold an audio or video file that multiple users will play at the same time, store the data externally to optimize performance.

File references in container fields are supported in server-side scripts only if the file is in a folder that FileMaker Server or FileMaker Cloud for AWS is allowed to access (see Paths in server-side scripts). File references are not supported in FileMaker WebDirect, the FileMaker Data API, or Custom Web Publishing.

Related topics 

Defining and changing fields

Transferring container data

Using data in container fields

Creating file paths