Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

Container.GetType

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 )

Parameters

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

Description

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

Examples

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]
Loop
    #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 )]
    #next
    Set Variable [$index; Value:$index + 1]
    Exit Loop If [$count = $index]
End Loop

See also


Container.GetTotalSize   -   Container.GetTypeSize

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins