No really good ways (i.e. user-resistant, unbreakable) but you could present a dialog box with an input global field where you provide the user with a fully realized filepath. Then you could allow the user to tweak it (assuming they understand how these paths work). You could then append their path to your filename, feed it to a variable and see what happens. The output path needs to be real path otherwise you'll get a "File can not be created..." error.
Must admit it sounds like a lot of potential complications.
Using FileMaker 14's 'Get Directory' script step, this is mostly possible... In that script step you can specify a default path, and then append your default file name to the result, and use 'Save as PDF' (with no dialog) to save the pdf to that location.
The script would be something like:
Get Directory [ Allow Folder Creation; $path; Default Location: Get(DesktopPath) & "/MyPDFs" ]
Set Variable [ $path; Value:$path & "mypdf.pdf" ]
Save Records as PDF [ Restore; No dialog; "$path"; Records being browsed ]
This assumes that the 'MyPDFs' folder already exists on the Desktop. If not, then I think it defaults back to the last used directory.
In this example, the file name of mypdf.pdf' is hard coded in, though you could use another method (e.g. a field value) to set the file name.
I forgot to say that I dont want the options dialog to appear. Only the save as.
1 of 1 people found this helpful
Did you have a go at the method I described above? The only dialog shown to the user is the 'Get Directory' one, where the user chooses where to save the PDF in the same way the 'Save as' dialog works..?
How did I miss that GetDirectory() function!