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


Shows dialog to import files.

Component Version macOS Windows Linux Server iOS SDK
FileDialog 9.1 ❌ No ❌ No ❌ No ❌ No ✅ Yes
MBS( "DocumentPicker.Import"; AllowedUTIs; Flags { ; DirectoryPath } )   More


Parameter Description Example Flags
AllowedUTIs The list of allowed universal types. "public.jpeg¶public.png"
Flags Various flags.
Value 1: Whether to allow multiple files to be selected. (iOS 11 or newer, otherwise ignored)
Value 2: Whether to show file extensions (iOS 13 or newer, otherwise ignored)
You can combine both flags and pass 1+2.
DirectoryPath Available in MBS FileMaker Plugin 11.0 or newer.
The path to the directory to use as base.
New in iOS 13.
$documentFolderPath Optional


Returns OK or error.


Shows dialog to import files.
The user selects an external document. The document picker copies the document, leaving the original unchanged.

On success, we store the list of file paths and trigger script. Script is trigger with parameter "Pick" or "Cancel".
The path list refers to a copy of the selected documents. These documents are temporary files. They remain available only until your application terminates. To keep a permanent copy, move these files to a permanent location inside your sandbox.

Warning: Function returns immediately and dialog shows after function returned asynchronously.


Import file with DocumentPicker:

# set script to call later
Set Variable [ $r ; Value: MBS( "DocumentPicker.SetTrigger"; Get(FileName); "Trigger" ) ]

# allowed list of file types:
Set Variable [ $Types ; Value: "public.jpeg¶public.png" ]

# show import dialog:
Set Variable [ $r ; Value: MBS( "DocumentPicker.Import"; $Types; 0 ) ]

See also

Release notes

Example Databases

Blog Entries

This function is free to use.

Created 28th January 2019, last changed 27th December 2020

DocumentPicker.Files - DocumentPicker.IsVisible