Brien Applegate Posted January 10, 2009 Posted January 10, 2009 Hi, I'm trying to save records as a PDF in a specific directory and also insert the PDF into a FileMaker container field. I've been able to do this successfully, but for some reason the copy stored in FileMaker has a filename of "Invoicessomefilename.pdf" and this is inconvenient for users who try to save the file from the IWP site. Please let me know what I could be doing wrong. Here are relevant script excerpts: Set Variable [$PDF; Value:Get(DocumentsPath) & "Invoices" & $FileName & ".pdf"] Save Records as PDF [Restore; No dialog; "$PDF"; Records being browsed] Insert File [invoices::Invoice PDF; "$PDF"] Thanks, Brien
bcooney Posted January 10, 2009 Posted January 10, 2009 Try: Set Variable [$pdf; Value:"file:" & Get (DocumentsPath) & "Invoices/" & "INV" & table::InvoiceID & ".pdf" Save Records as PDF [Restore; No Dialog; "$pdf" ; Current Record] Insert File [table::container; "$pdf"]
Brien Applegate Posted January 11, 2009 Author Posted January 11, 2009 Thanks, that did the trick. I'm developing this for Windows so I thought it would expect the backslash. But I guess FileMaker is smart enough to convert it. Pretty cool.
IdealData Posted January 11, 2009 Posted January 11, 2009 Don't know if you spotted this one but there were 2 problems: 1. "file:" was missing - this is what FM uses as a "file" protocol. 3. The "/" is translated depending on OS, but it is part of the FM file protocol.
Recommended Posts
This topic is 5796 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