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.SetTrigger
Sets trigger for document trigger.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| FileDialog | 9.1 | No | No | No | No | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| FileName | The file name of the script. | Get(FileName) |
| ScriptName | The script to trigger. | "FilesSelected" |
Result
Returns OK or error.
Description
Sets trigger for document trigger.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 ) ]
Sample trigger script:
Set Field [ PlaceHolder::Paths ; MBS( "DocumentPicker.Files" ) ]
Set Variable [ $path ; Value: GetValue(PlaceHolder::Paths; 1) ]
If [ Length ( $path ) > 0 ]
Set Field [ PlaceHolder::Container ; MBS( "Container.ReadFile"; $path; "auto") ]
Else
Set Field [ PlaceHolder::Container ; "" ]
End If
See also
Example Databases
Created 28th January 2019, last changed 8th July 2020
DocumentPicker.Open - DragDrop.AttachToWindow
Feedback: Report problem or ask question.
Links
MBS FileMaker blog