Skip to main content

Show Select Folder Dialog (script step reference)

By June 1, 2024June 4th, 2024Online Help, Troi File Plug-in
Troi File Plug-in > Script steps reference > Show Select Folder Dialog
Troi File Plug-in for FileMaker Pro

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.

SyntaxScript step badge

Show Select Folder Dialog [ Select ; Result ; Prompt ; InitialFolder ]

Options

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

Returned Result

Data type returned

Text

Result

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.

Originated in

Troi File Plug-in 9.0

Compatibility

FileMaker Pro 17 to FileMaker Pro 21 (2024)

Example

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\”.

Example 2

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 stepScript step badge

Show Select File Dialog

Related functionsFunction badge

TrFile_ListFolder
TrFile_SelectFolderDialog

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 17 to 2024 –> Show Select Folder Dialog (filep7272) 2024-0604 19:17:44