Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Container.GetTypes

Returns the list of objects in the container field.

Component Version macOS Windows Linux Server iOS SDK
Container 1.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Container.GetTypes"; Container )   More

Parameters

Parameter Description Example
Container The container field or value to inspect.

Result

Returns types or error.

Description

Returns the list of objects in the container field.
FileMaker stores a copy of the image in the container field as a JPEG if the image is not already of that type. That is why you will always see JPEG in the list of Types, even if the image in question is a PNG. This function will have "FILE" in the list of types if the image has File inserted into it.
Some of the allowed types include "TIFF", "PDF ", "PNGf", "GIFf", "BMPf", "EPS ", "PICT", "FILE" and "JPEG".
"ZLIB" is the type used by compressed containers.

This function does not work for unencrypted external containers.

Examples

Get Types

MBS( "Container.GetTypes" ; ContainerField )

Query PDF URL if there is PDF, otherwise use picture for data URL:

Let ( [
// take it from source container field
Container = ContainerField;
// now check what's inside
types = MBS( "Container.GetTypes"; Container );
// has PDF content?
Container = If(Position(types; "PDF "; 1; 1) > 0;
// extract PDF part
      MBS( "Container.ExtractStream"; ContainerField; "PDF "; "test.pdf"; "PDF " );
// otherwise use container as is
      Container);
// now make URL
result = MBS("Container.GetDataURL"; Container)
];result)

See also

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 27th July 2021


Container.GetTypeSize - Container.GetWidth