Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5796 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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"]

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.