| Function group | Execute on client | Platform(s) |
| FileOps | NO | All |
FileOps.$putfilename(&cPath[,cPrompt,cFilter,cInitialDirectory,iFlags])
Opens the standard Save file dialog. Returns Boolean true if a file was selected
You can specify the dialog title in cPrompt.
You can use cFilter on Windows and Linux in a similar way to the cFilter parameter of $getfilename().
You can also specify the initial directory for the Save dialog in cInitialDirectory.
You can supply a default value for the file name in cPath.
The iAppflags parameter only applies when running on macOS. It is optional; if specified, it must be a combination of the following constants:
| kFileOpsSelectApps | Allows applications to be selectable within the dialog |
| kFileOpsOpenApps | Allows the dialog to browse the content of applications |
Note that kFileOpsOpenApps automatically implies kFileOpsSelectApps, although it is valid to specify both flags (kFileOpsSelectApps + kFileOpsOpenApps).
The name and full path of the file entered by the user is returned in cPath. Note that the file is not saved: you must write the code to output the file. $putfilename() returns true if the user selected a file and pressed OK. Otherwise, it returns false, meaning that the user pressed Cancel.
CalculatelPathas'Default.rep'# set the default name
DoFileOps.$putfilename(lPath,'Save print file','*.rep','c:\omnis\examples')ReturnslError# opens the Save dialog with the title 'Save print file' and returns the name and full path of file entered by the user