When the PDF is created, we need to temporarily store it 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 created PDF is saved to the temporary path: Get(TemporaryPath). The local variable used to specify the file name and path is ignored. Instead the user is prompted to select one of the PDFs stored in the documents folder: Get(DocumentsPath).
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 must use the Documents path. However, now we need to delete the file after inserted into the container field. We have no “Delete File” script step but do have a workaround. If we run the Export Records script step, making sure to empty out the found set first, 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: We tested this 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.