6 Replies Latest reply on Apr 29, 2014 6:12 AM by deninger

    Perform Script on Server and Import and Export of Field contents

    deninger

      Maybe this just is not possible, but boy would it be handy (at least for me)...

       

      I am looking for a way to offload a simple procedure to my Server instead of performing it locally. The script does the following:

       

      # Filemaker ESS does not show SQL Server BLOB data. Initiate workaround

      Import Records [No dialog; DNS: PharmaservImages; Calcculated SQL Text: "Select..." ] // imports an image from a SQL Server database into a local container

       

      # imported image from SQL Server is shown as a "Untitled.dat" and is the contents of the blob data are not visible within the FM Container

      # export and reimport will correct this...

      Export Field Contents [Rx Files::Image ; $path] // exports the image to a predetermined path using Get (TemporaryPath) & ".output.jpg"

      Insert File [Display content; Never compresss; Rx Files::Image ; "$path" ] // re-imports the image, now visible within FileMaker's container field

       

      When the above is run locally "Perform Script", things work swimingly. I would love this to happen behind the scenes, but apparently the last two steps are not supported when executed as "Perform Script on Server"

       

      Any wisdom or insight that I have failed to latch on to?

       

      Regards,

       

      Mike