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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
DocumentPicker.Import
Shows dialog to import files.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| FileDialog | 9.1 | No | No | No | No | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| AllowedUTIs | The list of allowed universal types. | "public.jpeg¶public.png" |
| allowsMultipleSelection | Whether to allow multiple files to be selected. Pass 1 to allow and 0 to disallow. |
1 |
Result
Returns OK or error.
Description
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.
Examples
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
Example Databases
Created 28th January 2019, last changed 8th July 2020
DocumentPicker.Files - DocumentPicker.IsVisible
Feedback: Report problem or ask question.
Links
MBS FileMaker Plugins