Unexpected result when inserting picture using Apple Events in a workflow
Using a container field to store a multi-page PDF file.
Manual -Insert - Picture - Uncheck "Store Only Reference to File" works as expected. PDF file is inserted and displays as a picture of first page in the layout. When file is exported from database all PDF pages are present and correct as expected. The target file is faithfully stored in the FM container field and can be re-exported or launched as required.
But doing the same thing using Applescript as part of an automated workflow
set lvar to (choose file)
tell application "FileMaker Pro Advanced"
open file "XX.fp7"
set theRecord to create new record at database "XX"
set data cell "Doc_link" to lvar
The set command in the above script results in the pdf file being converted and inserted as a single page "xx.pict" file.
The layout shows the pict of the first page but when the file is exported the file is now exported as a single page "xx.pict" file. The pdf file is not faithfully inserted and stored.
I am looking for a way to store the original file (any file not just PDF) into FM using Apple Events, not just rendered as a pict.
FM9 Pro Advanced 9.0v3