Since you are saving to your desktop, it isn't likely to be a permissions issue despite the error message you are getting. More likely the path or file name is incorrect when you get such a message. Your file path looks correct, but Get ( CurrentDate ) may be returning characters that are not permitted in a file name and you've left off the ".PDF" file extension.
I use this expression for computing a file name that includes the Date:
Distributors::Name & " " & Substitute ( Get (CurrentDate) ; "/" ; "-" ) & ".PDF"
For those reading this thread that are interested in learning more about how to work with $Path variables in FileMaker scripts and container fields: Exploring the use of a $Path Variable in Scripts
Thanks for your quick response! Unfortunately it still doesn't work. I made the filename "A.pdf", and displayed $OrdersFolder in a custom dialog (shown below). Nothing odd about the path or name that I can see. I get the same error message however.
- Set Variable [ $OrdersFolder; Value:"File:" & Get (DesktopPath) & "A.pdf" ]
- Show Custom Dialog [ Title: "File Path etc..."; Message: $OrdersFolder; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
- Save Records as PDF [ File Name: “$OrdersFolder”; Automatically open; Records being browsed ]
Still get the same error (with the new filename)
Ok, this one is incredibly subtle. Use file: instead of File:.
Good grief. Is this a bug? Get (DeSkToPpAtH) works and fILE works, but File doesn't???
Thank you again!
It's never, to my knowledge, been reported as a bug, but feel free to use Report An Issue to do that if you want.
Before I do, are you aware of any other 'word' in the Filemaker lexicon that is case sensitive? Is this something I 'should have known'??
I've used FIleMaker Pro since 2.5 and didn't know that file: (and imagemac, imagewin, etc.) was casensitive until I was banging my head on the same wall a couple of years ago. Very few items are case senstive in FIleMaker. Passwords and SQL text expressions are the only two other cases that come to mind.