January 10, 200917 yr 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
January 10, 200917 yr 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"]
January 11, 200917 yr Author 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.
January 11, 200917 yr 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.
Create an account or sign in to comment