Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  


Returns the type at the given index (zero based).

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Container 1.4 Yes Yes Yes Yes Yes
MBS( "Container.GetType"; Container; index )   More


Parameter Description Example value
Container The container field or value to inspect. $container
index The index of the the item to query in the container. 0


Returns the type at the given index (zero based).
A container contains several data parts, each with an unique type.
Types are 4 character long and some types like "PDF " have an extra space.

See Container.GetTypes to query list of all types in a container.


Export all streams in container to individual files:

Set Variable [$container; Value:Test::Image]
#where to save
Set Variable [$DesktopFolder; Value:MBS("Folders.UserDesktop")]
#loop over streams in container
Set Variable [$count; Value:MBS( "Container.GetCount"; $container )]
Set Variable [$index; Value:0]
    #query the type of stream with given index
    Set Variable [$type; Value:MBS( "Container.GetType"; $container; $index )]
    #write it to a file
    Set Variable [$path; Value:$DesktopFolder & "/" & $type]
    Set Variable [$r; Value:MBS( "Container.Export"; $container; $index; $path )]
    Set Variable [$index; Value:$index + 1]
    Exit Loop If [$count = $index]
End Loop

See also

Blog Entries

Created 18th August 2014, last changed 6th November 2018

Container.GetTotalSize   -   Container.GetTypeSize

Feedback: Report problem or ask question.

MBS FileMaker blog