Show Select File Dialog (script step reference)

By May 1, 2017 May 22nd, 2019 Online Help, Troi File Plug-in
Troi File Plug-in > Script steps reference > Show Select File Dialog
Troi File Plug-in for FileMaker Pro

Show Select File Dialog

Presents the user with a standard dialog and displays all files in a directory.

SyntaxScript step badge

Show Select File Dialog [ Select ; Result ; Prompt ; InitialFolder ;
                          Allow multiple selection ; Show invisibles ;
                          Allow package selection ; Allow navigate into packages ]

Options

Select entire contentsreplaces the entire contents of a field with the result. If not checked the result replaces the currently selected portion of the field
Resultfile path for the selected file
Promptthe 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 selectionallow the user to select multiple files in the dialog
Show invisiblesshows 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

Returned Result

Data type returned

Text

Result

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.

Originated in

Troi File Plug-in 9.0

Compatibility

FileMaker Pro 16 to 18

Considerations

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.

Example

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

Show Save File Dialog
Show Select Folder Dialog

Related functionFunction badge

TrFile_SelectFileDialog

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 14 to 18 –> Show Select File Dialog (filep7271) 2019-0522 16:40:00