13 Replies Latest reply on Apr 7, 2017 2:59 PM by JulioSandoval

    Insert Images from Host location

    JulioSandoval

      Hello,

       

      I added a second Database Location and Container Location and my images and database are being stored properly as they should. It is working awesome.

       

      For this example, in my Observation Table, the Image container field has an open container path with:

      [hosted location]/Observations/Clients::Client_ID & "/" & Projects::Projects_ID & "/" & Property::Property_ID & "/" & PCS::PCS_ID & "/" & Observations::Obv_ID & "/"

       

      Now, a script was created that processes these images and are placed in the same Drive but in a different folder. Same directory is followed but instead of it calling for "D:\Images\RC_Data_FMS\etc." location, it is "D:\Processed\LargeRes\etc.

       

      How do I tell filmmaker to insert an image from the Processed folder?

       

      These images are living on the FM Server and I have been playing with the "Insert Picture" script but no luck.

       

      I have been able to get the Container Attribute with this calculation in a field called "external path":

      "D:/Images/RC_Data_FMS/dbname/Observations/" & GetContainerAttribute ( Image ; "externalFiles" )

       

      The result is:

      D:/Images/RC_Data_FMS/dbname/Observations/CL0002/Pr000008/P1-13/PCS000344/OV000337/OV000337-TB-IMG00013.jpg

       

      I was then able to create another calculation to replace the [hosted location] path with the "Processed Folder" path:

      We will call this field "LargeRes" with calculation:

      Replace ( externalPath ; 10 ; 37 ; "/Processed/LargeRes/" )

       

      The above result is:

      D:/Images/Processed/LargeRes/Observations/CL0002/Pr000008/P1-13/PCS000344/OV000337/OV000337-TB-IMG00013.jpg

       

      If I copy and paste the above path on the server, it takes me to the proper image in the Processed Folder.

      So I know the path works, and it grabs the proper image.

       

      How do I tell FileMaker to insert an image that is located in "Processed" path into a container?

       

      I have tried using a variable for the path but no luck. I have also tried "Perform Script On Server" since the images live on the server and not on the local client.

       

      Example

      Set Variable [$Path ; Value: observations::LargeRes]

      and in the Insert Picture script step, I do $Path as the path of the image.

       

      I have even tried :

      Insert Picture [ "$Path & "imagename.jpg" " ]

       

      to see if it specifically inserts the image I call for but it doesn't either

       

      Thanks guys for your help.

       

      Appreciate it.