Skip to main content

Show Save File Dialog (script step reference)

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

Show Save File Dialog

Presents the user with a dialog, in which the user can specify where to save a file. The step returns with the path of the chosen file.

SyntaxScript step badge

Show Save File Dialog [ Select ; Result ; Prompt ; Default name ;
                        Initial folder ]

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 file path for the selected file
Prompt the prompt that will be displayed to instruct the user
Default name (optional) the default file name of the file to be saved
InitialFolder (optional) the path to the folder where the dialog initially starts

Returned Result

Data type returned

Text

Result

FilePath; The function returns a file path for the selected file.

Use this filePath as the basis for other File Plug-in functions.

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)

Considerations

To change the default filtering see the TrFile_SetDefaultType function, or take a look at “Filtering Files” in the example databases.

Example

Show Save File Dialog [ Select ;  Result: myFileName ; "Please choose a file to create" ; 
		        "myFile.txt" ; gInititialDir ]
If [ Left ( myFileName ; 2 ) <> "$$" ]
    Create File [ Select ; gErrorCode ;  myFileName ]
End If

This will ask the user for a file to create, which is then created.

Related script stepsScript step badge

Create File
Show Select File Dialog

Related functionFunction badge

TrFile_SaveFileDialog

Related topics

Troi File Plug-in online help (overview)


Online Help Page for Troi File Plug-in for 17 to 2024 –> Show Save File Dialog (filep7264) 2024-0604 19:16:49