The Original FileMaker Community
Business Templates - Demo Apps - Video Tutorials -Samples - Help - 46000 Member Forum

The Leading Filemaker Developer Tools

How to generate a PDF and store it in a container field in FileMaker Go – FileMaker Today

Get real time updates directly on you device, subscribe now.

When the PDF is created, it needs to be temporarily stored on the file system, so that it can then be inserted into the container field. However, the Insert PDF script step doesn’t seem to work properly in FileMaker Go when the PDF that was created is saved to the temporary path: Get(TemporaryPath). The local variable used to specify the file name and path is ignored, and instead the user is prompted to select one of the PDFs that’s stored in the documents folder: Get(DocumentsPath).

By the way, when using FileMaker Go, you can see the PDFs that are in the Get(DocumentsPath) location, if there are any there at all, by selecting “Device” from the left side of the screen. If you have an fmp12 file currently open, you will need to go to your Home view first (tap the icon in the upper-left) and then select “Device” on the left side. The PDF files are listed below the FileMaker files, so you may need to scroll down first.

We would like to use the temporary path to store the PDF file, because then it would automatically be deleted once FileMaker closes. But because this doesn’t seem to work properly in FileMaker Go, we are forced to use the Documents path. However, now we need to delete the file after it’s inserted into the container field, so that it doesn’t linger there after we’re done. There is no “Delete File” script step, but there is a workaround we can use. If we run the Export Records script step, making sure to empty out the found set first, then the file will be deleted.

Note, in FileMaker Pro, you can also delete a file using the Export Field Contents step if you specify the file name and path but don’t specify a field. But this method doesn’t seem to work in FileMaker Go.

Note: The above was tested using FileMaker Pro 13 Advanced with Mac OS X 10.8.5, FileMaker Pro 13 Advanced with Windows Server 2008 R2, and FileMaker Go 13.0.5 with iOS 7.1.2.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More