3 Replies Latest reply on Jul 30, 2012 4:37 PM by JodieWeston

    Storing images as a reference to the file

    JodieWeston

      Title

      Storing images as a reference to the file

      Post

      Does anyone know how to set up a file so that when images are stored only as a reference, you can change the location of the database and folder containing images, without losing the link between the two?  Thanks Jodie :)

        • 1. Re: Storing images as a reference to the file
          davidanders

          I struggled with that a while ago.

          Mac and Win FMP were accessing photos and files on a server (OSX)
          This means that the computers had to have the server mounted to view and choose images.

          I got the path to the server.
          Setup several global fields - servername, folder01, folder02, folder03, folder04, folder05.

          Used Calculation fields to concantenate the fields to a path with empty fields skipped.
          Path was //servername/folder01/folder02/filename.extension
          Had to setup two complete sets of fields - one for Mac Path and one for Windows Path.

          Changing the servername would switch to a different server. deleting folder02 would move the expected location up one level.
          Worked well.

          • 2. Re: Storing images as a reference to the file
            philmodjunk

            It's possible to use Replace Field contents to edit the filepath in a container field for a found set of records just as though it was a text field. Thus, you can set up a replace field contents operation that edits the filepaths of all the records' container fields to point to the new location.

            You can also set up a looping script that uses Export Field Contents to export the field to the new location. The script can export the file to the new location and then insert the file from this new location to upate the filepath in the container field to have the new location's path.

            • 3. Re: Storing images as a reference to the file
              JodieWeston

              Thank you both for responding to my post...very much appreciate :)