GetContainerAttribute
 
Purpose 
Returns the file metadata of the specified container field.
Format 
GetContainerAttribute(sourceField;attributeName)
Parameters 
sourceField - the name of a container field.
attributeName - the name of a supported attribute (see below).
Data type returned 
text, number, date, time, timestamp, container
Originated in 
FileMaker Pro 13.0
Description 
Some attributes may not return a result. For example, the values for the latitude and longitude of a photo may not be available, or some audio metadata like album art may not be available because the metadata is stored outside the audio file. Some individual attributes in the group attribute all may not be applicable in some circumstances.
Tip  To minimize the frequency with which FileMaker Pro analyzes container data, use GetContainerAttribute in a field's auto-enter calculation and deselect Do not replace existing value of field (if any). In this case, GetContainerAttribute will update only when the contents of the specified container field change. If GetContainerAttribute is used in a calculation field definition, the calculation may update each time the current record changes, reducing the performance of your solution.
Attributes
 
The method used to store the data in the container field: Embedded, External (Secure), External (Open), File Reference, Text.
1 if the image has an alpha channel, otherwise returns 0.
A number representing the orientation of the photo:
1 (Normal)
2 (Flipped horizontally)
3 (Rotated 180 degrees)
4 (Flipped vertically)
5
(Rotated 90 degrees counterclockwise and flipped vertically)
6 (Rotated 90 degrees counterclockwise)
7
(Rotated 90 degrees clockwise and flipped vertically)
8 (Rotated 90 degrees clockwise)
Note: Photos that were inserted using earlier versions of FileMaker Pro are not automatically oriented; for such photos, not applied is appended to the result. For example, 3 (Rotated 180 degrees), not applied.
The track number and count of the audio. For example, 3/12, or 3 if the track count is not available.
Notes
 •
The internalSize can be much smaller than the fileSize (for example, container fields set up for open or secure storage, file references, or compressed files) or much larger than the fileSize (for example, container fields created by plug-ins).
 •
Using the attribute MD5 allows you to prevent the insertion of duplicated files into a container field regardless of the filename.
 •
 •
For the group attributes general, audio, image, photo, and all, attributes are displayed in the format attributeName: attributeValue with one attribute per line. Some attributes are displayed differently in order to fit the attribute on one line:
 •
externalFiles. Displays only the number of external files.
 •
transparency. Displays 1 (True) or 0 (False).
 •
coverArt. Displays png or jpg depending on the type of image.
 •
bitRate. Displays kbps after the number. If an audio uses a variable bit rate, (VBR) is appended to the result. For example: Bit Rate: 247 kbps (VBR).
 •
year. Date information may be returned in parentheses after the year. For example: Year: 2014 (11/10/2014).
Examples 
Notice that the attributes in the following examples are enclosed in quotation marks.
GetContainerAttribute(Image;"all") returns:
[General]
Filename: IMG_003.JPG
Storage Type: Embedded
MD5: C35A3F668A1FB3F370969399A1FF04FE
File Size: 1964978
Internal Size: 1965064
External Size: 0
External Files: 0
 
[Image]
Width: 1936
Height: 2592
DPI Width: 72
DPI Height: 72
Transparency: 0 (False)
 
[Photo]
Orientation: 6 (Rotated 90 degrees counterclockwise)
Created: 1/14/2015 2:40:31 PM
Modified:
Latitude: 37.406167
Longitude: -121.983333
Make: Apple
Model: iPhone 5s
 
GetContainerAttribute(Product;"barcode") returns:
[Bar Code]
Bar Code Text: 875720001107
Bar Code Type: UPC-A
 
GetContainerAttribute(Package;"signature") returns:
[Signature]
Signed: 11/10/2014 11:41:22 AM
Related topics 
Functions reference (category list)
Functions reference (alphabetical list)
About formulas
About functions
Defining calculation fields
Using operators in formulas