djeans Posted November 11, 2006 Posted November 11, 2006 Hello, I have a script that I save a copy of the current layout as a pdf, but would like to name the file based on the values of two fields. I can't seem to get it to work. Here is the script. Set Variable [$Saveas; Value:Purchases::Invoice Date & " " & Purchases:Vendor &".pdf Save Records as PDF [Restore; No dialog; "$Saveas"; Records being browsed] after running the script I get an error message "2006 Vendor_name.pdf" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk. The disk is not locked, or full. The problem appears to be with the date. Not sure why it is only showing the year instead of the full date. Any suggestions? Thanks Darron Jeans
Matt Klein Posted November 11, 2006 Posted November 11, 2006 Try this: Set Variable [$Saveas; Value:Substitute(Purchases::Invoice Date; "/"; "-") & " " & Purchases:Vendor &".pdf" Windows file names can't have "/" characters in them.
Recommended Posts
This topic is 6589 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now