Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4   11.5   11.6    Statistic    FMM    Blog  

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

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


Container.GetTypeSize - Container.GetWidth

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos

Start Chat