4 Replies Latest reply on Feb 24, 2012 9:14 AM by philmodjunk

    "image:"

    JustinRichardson

      Title

      "image:" & "Open URL" using a relative path

      Post

      Hi, I'm fairly new to using filemaker and I'm stuck on an issue. I'm hoping that someone here can help me out.  I've searched all of the forums and help, but I can't find an answer to what seems to be a very easy and simple task.

      I currently have a filemaker database that uses a container field to display a .tif image in the layout view.  When you click on this image a Button setup is used for the Open URL command to open the image file in another program.  It works Perfectly, however, I'm using full path names with drive letters.  I'd like to have the exact same functionality, but with relative paths.  I think I just need the correct syntax.  Here are the examples of the existing image: and Open URL fields that work perfectly.  Can someone tell me how to drop the drive letter and make it relative?

      image:/F:/GIS/KKW/Data/ServiceCards/scans/0013704924.tif

      F:\GIS\KKW\Data\ServiceCards\scans\0013704924.tif

      Again, both work perfectly, but I'd like to drop the drive letter and make the paths relative starting with the "scans" folder.

      Any help would be greatly appreciated.

      I'm using FileMaker Pro Advanced 11

      -Justin

        • 1. Re: "image:" & "Open URL" using a relative path
          davidanders

          Relative to a known location.

          Filemaker knows where the database is.

          You could use a relative link starting with the enclosing folder of the database.

          (this is true in many link structures, including webpages)

          • 2. Re: "image:" & "Open URL" using a relative path
            philmodjunk

            Get ( FilePath ) will give you the path to the current location of your file.

            Get ( FileMakerPath ) will give the path to the filemaker application

            Get ( DesktopPath ) will give you the path to the desktop

            Get ( DocumentsPath ) will give you the path to the documets folder

            With any of these, you can include the text in an expression to return a path to a location within the enclosing folder.

            • 3. Re: "image:" & "Open URL" using a relative path
              JustinRichardson

              Well, I figured out the OpenURL syntax for a relative path

              .\scans\0013704924.tif


              The file maker database is located in the same directory as the scans folder.  I still cannot figure out how to do the same thing with the image: command.  I tried this: 

              image:/./scans/0021305700.tif

              image:./scans/0021305700.tif

               

              Both of which do not work.  

              PhilModJunk, I don't understand how your technique would work.  Any chance you could write a sample?  I know where all of my images are located and I know where the database is located.

              Image location: F:\GIS\KKW\Data\ServiceCards\scans\0013704924.tif

              Database location: F:\GIS\KKW\Data\ServiceCards\

              Ther must be an easy wat to do this.


              Thank you for the replies so far.

              • 4. Re: "image:" & "Open URL" using a relative path
                philmodjunk

                I don't know that they will. If you could locate the files in question inside one of the locations referenced by a Get Function, you can compute the path to one of those locations. If you must leave them where they are, I don't know that you can.