Show Select Folder Dialog
With this step the user can select a folder on disk. The step will show the user a standard dialog with the hierarchy of folders on the computer.
Show Select Folder Dialog [ Select ; Result ; Prompt ; InitialFolder ]
|Select entire contents||replaces the entire contents of a field with the result. If not checked the result replaces the currently selected portion of the field|
|Result||path for the selected folder|
|Prompt||the prompt that will be displayed to tell the user which folder to select|
|InitialFolder||(optional) the path to a folder on disk that will be used as the starting point for the selection dialog|
Data type returned
The function returns a folder path for the selected folder. This folder can be used with other functions of the plug-in.
If the user cancels an error code of “$$-1” is returned.
Troi File Plug-in 9.0
FileMaker Pro 16 to 19
Show Select Folder Dialog [ Select ; Result: $FolderResult ; "Please choose a folder where you want to put the files." ; " C:\Data\" ]
This will present a folder selection dialog. The dialog initially shows the folder: “C:\Data\”. The user can then select a folder and click on OK. The function returns with the path to the folder, for example: “D:\MyFiles\Databases\”.
We assume that in your FileMaker file the following fields are defined:
gFolderPath Global, text gInitialFolder Global, text
gInitialFolder should contain the path to a folder, for example “D:\Logs\Data\” (Windows) or “Mac HD:Logs:Data:” (macOS). In a script add the following script step:
Show Select Folder Dialog [ Select ; Result: gFolderPath ; "Please choose a folder where you want to put the files." ; gInitialFolder ]
After the dialog gFolderPath will contain the path to the selected folder.
Related script step
|Show Select File Dialog|
Troi File Plug-in online help (overview)