3 Replies Latest reply on Dec 31, 2012 2:49 PM by philmodjunk

    Auto update field



      Auto update field


           I would like to modify the photo library template so that it automatically updates the image file from a specific folder. As I add photos in the folder, I would like FileMaker to automatically add them to the database without changing any other records. This is to keep track of photos submitted to stock photo agencies. As I submit them to an agency, I'd like to add thumbnails to the image folder and have FM automatically add them to the database. Can this be done without extensive coding? I'm not much good with code. I'm in FileMaker Pro 10



        • 1. Re: Auto update field

               Are you adding image files to a folder and then need to see them in FileMaker or are you inserting image files into container fields and then need to see the same image appear in a designated folder?

               This sounds very similar to a project that I am currently working on and which must run in FileMaker 10 on Windows. The users can add image files to a folder inside their documents folder and then FileMaker imports the images into container fields and then exports the images out to a shared directory on a file server, updating the container fields to be "by reference" container fields that refer to the copies of the files that were exported to the server.

               I use batch files to delete files from the "in box" folder and to manage sub directories (only one level) within the shared directory on the file server. A batch file even maps the shared directory to a specified drive letter so that each user is assured a valid file path for the "by reference" image files.

          • 2. Re: Auto update field

                 Adding image file to a folder. Preferably I can get FM to read the folder on startup and auto add any new image files without changing any other data. There is no server involved, just a local machine. I just want to keep track of which photos have been submitted to which agencies and what their response was. Part of the submission routine (from Adobe LightRoom) is to save a small version of each file submitted to the default folder that FM will be addressing.

            • 3. Re: Auto update field

                   To read the folder contents of just any folder on your computer requires getting a plug in. But reading the contents of a folder located inside your computer's documents folder is within FileMaker's native capabilities.

                   You may or may not need to list the contents of a folder, however.

                   Using FileMaker, you should import or insert (Two different operations that can produce the same results) the image files "by reference" in to a container field such that you have one image file in each record in the table. Using the "store a reference option", the resulting container fields contain the file path to the image. You can open and examine the image file's image directly from FileMaker.

                   What I've set up is a two folder system where I use Import Records | Folder to import all image files from a designated "In box" folder into records in a table in the database. I then use a looping script with Export Field Contents to export the contents of my container fields into a designated folder for storage purposes, re-inserting the image file by reference from this new location in order to update the container fields to reference this new copy of my files. I then clear the image files from the inbox.

                   I can do all of this with built in FileMaker script steps except for deleting files from the in box, I use FileMaker to execute a system script for that. Since I have set this up for windows, my system constructs, exports and executes a batch file to accomplish that last step.