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.
Syntax
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 steps
Create File |
Show Select File Dialog |
Related function
TrFile_SaveFileDialog |
Related topics
Troi File Plug-in online help (overview)