Show Select File Dialog
Presents the user with a standard dialog and displays all files in a directory.
Show Select File Dialog [ Select ; Result ; Prompt ; InitialFolder ; Allow multiple selection ; Show invisibles ; Allow package selection ; Allow navigate into packages ]
|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||file path for the selected file|
|Prompt||the prompt that will be displayed to tell the user which file to select|
|InitialFolder||(optional) the file path to the folder where the dialog initially starts|
|Allow multiple selection||allow the user to select multiple files in the dialog|
|Show invisibles||shows invisible files in the selection dialog|
|Allow package selection||(Mac OS) Allow selection of Mac OS packages, like application packages|
|Allow navigate into packages||(Mac OS) Allow Mac OS packages, like application packages, to be opened and navigated|
Data type returned
The function returns a full path for the selected file to be used with one of the file manipulation functions.
If the user cancels an error code of “$$-1” is returned.
Troi File Plug-in 9.0
FileMaker Pro 16 to 18
Filtering on Mac OS is now the same as on Windows. To change the default filtering see the TrFile_SetDefaultType function, or take a look at “Filtering Files” in the example databases.
NOTE: Mac OS packages, like application packages, are actually folders, so this will return a path to a folder!
When the option “Allow multiple selection” is added you can use the Command key on Mac OS or the Control + Alt key on Windows to select or deselect extra items. To select a contiguous group of files at once, click on the first file, then hold Shift and click the last one and all files are selected.
Each selected file is returned on a new line.
On Mac OS:
Show Select File Dialog [ Select ; Result: MyFileName ; "Please choose a file to import" ; "Mac HD:Solution Files:Import:" ]
Show Select File Dialog [ Select ; Result: MyFileName ; "Please choose a file to import" ; "Mac HD:Solution Files:Import:" ; Allow package selection ]
Or on Windows:
Show Select File Dialog [ Select ; Result: MyFileName; "Please choose a file to import" ; "C:\Solution Files\Import\" ]
This will start the selection at the folder “Import” in the “Solution Files” folder.
It returns “HD Mac:Text files:My Letter” if the user selects that particular file on Mac OS. On Windows it may return “C:\Text files\My Letter”.
Related script steps
|Show Save File Dialog|
|Show Select Folder Dialog|