1 Reply Latest reply on Mar 12, 2013 9:36 AM by philmodjunk

    Preview of a file contaner



      Preview of a file contaner




           On my database, I need 2 containers. In the first one, I drag an image (the file is saved as such and can be opened using the double click) and with the second container I use the "insert picture" button to get the image as picture rather than a file logo.


           I was wondering if it is possible to link these 2 containers so that when I drag an image to the container "Image 1" it automatically "inserts" in "Picture" as an image. Is that possible?


           Thanks for your help.



        • 1. Re: Preview of a file contaner

               What version of FileMaker are you using?

               I will assume FileMaker 12 for this answer.

               Drag and drop does the equivalent of Insert Picture without selecting the "store a reference" option. That means that there is no difference between the data in the two container fields unless the second field has the file inserted with the "store a reference" option enabled.

               Since you have no file path to the original file in your first container field. You can't automatically reference the original location of the image from the data in the first container field. That may or may not be a problem depending on how you need to work with your image files.

               What you can do, is use Export Field Contents in a script to export a copy of the file from the first container field to a specified location. Then your script can do an insert picture to insert a picture with the store a reference option enabled from that newly created copy of the file. This is one way to enable users to drag and drop files into the database only to transfer them automatically to a specified folder to make the added image accessible to all your users on the network.

               On the other hand, with external storage enabled on the first container field, drag and drop should automatically transfer a copy of the image to the specified storage location for that container field. That might completely eliminate the need for the second container field.

               Note: with FileMaker 11 on windows, drag and drop inserts an OLE object into the container field and this can't be used the way you have specified in your post as you can't export an OLE object from a container field. (OLE is not supported in FileMaker 12.)