2 Replies Latest reply on Aug 26, 2009 10:09 AM by MWHITE

    Unexpected result when inserting picture using Apple Events in a workflow

    MWHITE

      Title

      Unexpected result when inserting picture using Apple Events in a workflow

      Post

      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"

      tell theRecord

      set data cell "Doc_link" to lvar

      show

      end tell

      end tell 

       

      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.

       

      Michael White

       

      FM9 Pro Advanced 9.0v3