Returns the file metadata of the specified container field.
GetContainerAttribute ( field ; attributeName )
field
- any expression that returns container data.
attributeName
- the name of a supported attribute (see below).
text, number, date, time, timestamp, container
FileMaker Pro 13.0
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.
Attribute | Returns | Data type returned |
General |
|
|
| The name of the file inserted into the container field. | text |
| The result of applying the cryptographic hash function MD5 to a file inserted into the container field or a file referenced by a container field. | text |
| The method used to store the data in the container field: Embedded, External (Secure), External (Open), File Reference, Text. | text |
| The size (in bytes) of the file inserted into the container field. | number |
| The amount (in bytes) of the space inside the database file that is occupied by the container field. | number |
| The amount (in bytes) of the space that is stored externally by the container field. This is either the size of the referenced file or the total size of all files in the container field (set up for open or secure storage). | number |
| A list of the external files associated with the container field (either files using open or secure storage or a file reference). | text |
|
|
|
Images |
|
|
| A number representing the width of the image in pixels. | number |
| A number representing the height of the image in pixels. | number |
| A number representing the horizontal DPI of the image. | number |
| A number representing the vertical DPI of the image. | number |
| 1 if the image has an alpha channel, otherwise returns 0. | number |
|
|
|
Photos |
|
|
| Note Only JPEG and TIFF files return results. |
|
| A number representing the orientation of the photo: Note Photos that were inserted using earlier versions of FileMaker Pro Advanced or FileMaker Pro are not automatically oriented; for such photos, not applied is appended to the result. For example, 3 (Rotated 180 degrees), not applied. | text |
| The earliest available timestamp for the photo. | timestamp |
| The latest available timestamp for the photo. If the photo has never been modified, an empty string is returned. | timestamp |
| The latitude of the location of the photo. | text |
| The longitude of the location of the photo. | text |
| The manufacturer of the camera used for the photo. | text |
| The camera model used for the photo. | text |
|
|
|
Audio |
|
|
| Note Only MP3 and M4A files return results. |
|
| The title of the audio. | text |
| The name of the performer of the audio. | text |
| The name of the album containing the audio. | text |
| The year the audio was released. | text |
| The track number and count of the audio. For example, 3/12, or 3 if the track count is not available. | text |
| The genre of the audio. | text |
| The composer of the audio. | text |
| An image of the album cover. | container |
| The duration of the audio. For example, 0:03:16. | time |
| The number of kilobits per second (kbps) used in the audio. | number |
|
|
|
Bar codes |
|
|
| The contents of the bar code. | text |
| The type of the bar code. | text |
|
|
|
Signatures |
|
|
| The timestamp when the signature was inserted. | timestamp |
|
|
|
Groups |
|
|
| Attributes listed in the General category above pertaining to the container field. | text |
| Attributes listed in the Audio category above pertaining to the container field. | text |
| Attributes listed in the Images category above pertaining to the container field. | text |
| Attributes listed in the Photos category above pertaining to the container field. | text |
| Attributes listed in the Bar Codes category above pertaining to the container field. | text |
| Attributes listed in the Signatures category above pertaining to the container field. | text |
| Attributes in all the categories listed above pertaining to the container field. | text |
•Bar codes and signatures are not considered images.
•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: 2019 (11/10/2019).
•Each returned value, except the last, ends with a carriage return.
•To minimize the frequency with which FileMaker Pro Advanced 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.
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/2020 2:40:31 PM
Modified:
Latitude: 37.406167
Longitude: -121.983333
Make: Apple
Model: iPhone 8
GetContainerAttribute(Product;
"barcode
")
returns:
[Bar Code]
Bar Code Text: 875720001107
Bar Code Type: UPC-A
GetContainerAttribute(Package;
"signature
")
returns:
[Signature]
Signed: 11/10/2019 11:41:22 AM