Container.GetTypes
------------------

Returns the list of objects in the container field.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Container](component_Container.md) | [1.3](newinversion13.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Container.GetTypes"; Container ) 

**MBS**( **"Container.GetTypes";** /\* Returns the list of objects in the container field. \*/  
**$Container**) /\* The container field or value to inspect. \*/ 

### 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) &gt; 0;  
// extract PDF part  
 MBS ( "[Container.ExtractStream](ContainerExtractStream.md)"; ContainerField; "PDF "; "test.pdf"; "PDF " );   
// otherwise use container as is  
 Container);  
// now make URL  
result = MBS ("[Container.GetDataURL](ContainerGetDataURL.md)"; Container)  
\];result)  
### See also

- [Container.GetBase64](ContainerGetBase64.md)
- [Container.GetHex](ContainerGetHex.md)
- [Container.GetMimeType](ContainerGetMimeType.md)
- [Container.GetName](ContainerGetName.md)
- [Container.GetTypeSize](ContainerGetTypeSize.md)
- [Container.GetWidth](ContainerGetWidth.md)
- [Container.RenameStream](ContainerRenameStream.md)
- [DynaPDF.GeneratePreview](DynaPDFGeneratePreview.md)
- [PDFKit.GeneratePreview](PDFKitGeneratePreview.md)
- [XL.Book.GetPicture](XLBookGetPicture.md)

### Example Databases

- [Containers/Archive Container](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Containers/Archive%20Container.shtml#1293FieldAnchor_)
- [Containers/Container Remove Test](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Containers/Container%20Remove%20Test.shtml#1292FieldAnchor_)
- [Containers/Containers](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Containers/Containers.shtml#1292FieldAnchor_)
- [Containers/Create Container Preview](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Containers/Create%20Container%20Preview.shtml#1ScriptAnchor_)
- [DynaPDF/Generate Previews](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Generate%20Previews.shtml#1294FieldAnchor_)
- [DynaPDF/Merge PDFs](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Merge%20PDFs.shtml#11ScriptAnchor_)
- [DynaPDF/Optimize PDF](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Optimize%20PDF.shtml#1297FieldAnchor_)
- [Mac and iOS/PDFKit/PDFKit Print Documents](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/PDFKit/PDFKit%20Print%20Documents.shtml#1298FieldAnchor_)
- [Window/PDF from Window (Mac)](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/PDF%20from%20Window%20%28Mac%29.shtml#1292FieldAnchor_)

### Blog Entries

- [Filemaker: Export Text to File](https://www.mbsplugins.de/archive/2025-06-26/Filemaker_Export_Text_to_File/monkeybreadsoftware_blog_filemaker)
- [Merge documents with DynaPDF](https://www.mbsplugins.de/archive/2023-07-06/Merge_documents_with_DynaPDF/monkeybreadsoftware_blog_filemaker)
- [Render pictures from PDF](https://www.mbsplugins.de/archive/2021-06-27/Render_pictures_from_PDF/monkeybreadsoftware_blog_filemaker)
- [Convert HEIF images if needed](https://www.mbsplugins.de/archive/2021-06-17/Convert_HEIF_images_if_needed/monkeybreadsoftware_blog_filemaker)
- [FileMaker and PDF Containers](https://www.mbsplugins.de/archive/2017-08-30/FileMaker_and_PDF_Containers/monkeybreadsoftware_blog_filemaker)
- [Compressed Containers](https://www.mbsplugins.de/archive/2015-09-16/Compressed_Containers/monkeybreadsoftware_blog_filemaker)
- [Filemaker: Export Text to File](https://www.mbsplugins.de/archive/2012-11-08/Filemaker_Export_Text_to_File/monkeybreadsoftware_blog_filemaker)
- [MBS Filemaker Plugin 2.1 prerelease 2](https://www.mbsplugins.de/archive/2010-05-11/MBS_Filemaker_Plugin_21_prerel/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

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

  
[Container.GetTypeSize](ContainerGetTypeSize.md) - [Container.GetWidth](ContainerGetWidth.md)

[HTML Version](ContainerGetTypes.shtml)