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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Shows dialog to import files.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
FileDialog | 9.1 | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |
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. |
1 | |
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.
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 ) ]
This function is free to use.
Created 28th January 2019, last changed 27th December 2020