Error Capture Script and Bypassing Filemaker Errors
For this application, I use Filemaker Pro Advanced to store my database of scientific literature. Every record has a container field that contains the PDF of the article. I have created a script for my button that uses ExportFieldContents with automatically open, and gives it a name "test.pdf". However, I need to close that file before opening another or I get a Filemaker error message: "test.pdf" could not be created on the disk.... That's because the file it is trying to save to is open. To get around this problem, I wanted to modify my script with an "if" statement that would use ErrorCapture and GetLastError. I would then say, if this file is used, use Test1.pdf etc. However, as soon as the script gets to the line with ExportFieldContents the error I mentioned pops up, without ever getting to the next line in the code. Is there any way around this?