Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Save as Pdf, overwriting issue

Featured Replies

Hi guys, I created a layout for my purchasing orders table and added a button which performs a script to save the record as pdf on a filepath, as follows:

Set Variable[$PO_pdf; Value:Purchasing Orders::poID&".pdf"]

Save Records as PDF[Restore; No dialog;"$PO_pdf";Automatically open; Current Record]

I would like to prevent overwriting, since if someone browses the record after the first "save" and accidentally (or on purpose) presses the "save as pdf" button filemaker automatically overwrites the existing file.

I've come up with two solutions:

1) Set the pdf name (i.e. variable $PO_pdf) as

Value:Purchasing Orders::poID & ".pdf" & {{CurrentDate}}

but with this method I'll have two (or more) identical POs with different dates which would be a bit annoying.

2)Set a field named "savestatus" (initial value = 0) and maybe a script triggers OnObjectEnter on "save as pdf" button that changes "savestatus" to 1. Then set conditional formatting on the "save as pdf" for it to vanish on savestatus = 1.

Not so brilliant ideas imo :)

Can you suggest something else to prevent overwriting? Thanks a lot!

I don't understand why overwriting is an issue. If the most recent version of the PO is the one in the database (not a PDF), why would overwriting a previous saved PDF with the most current PO be a problem? Also, what is the purpose of the PO.pdf?

  • 2 weeks later...
  • Author

It is required by the company I work for that all documents we create are saved as .pdf and most of them must be printed as well. I know this is quite annoying and not so useful but that's how things are to be done.

Maybe you're right about the fact that it's not a big issue if a PO gets overwritten bcooney, I'll try to figure out how to handle the overwriting so that I can keep history of the modifications on POs.

Before you attempt to export try to import the PDF that might already exist. If you get an error then the file does not exist, so now you can deal with the next step.

Of course, if the user has moved the original from the expected place then this will fool matters.

"History of modifications on POs" -- what do you mean? After they are sent to a vendor? After they are approved by a director, for example? What is the workflow?

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.