3 Replies Latest reply on Jun 25, 2016 2:47 PM by RichardHurley

    container field pathname

    RichardHurley

      I would like to display the pathname of an image file imported into a container field.  I thought I could make a calculated text field and set its contents to something like Get ( FilePathName, MyContainerField). (Forgive the hazy syntax. I'm a tourist as far as FileMaker scripting is concerned.)

       

      Is there a way to do this? I haven't found anything in the Container and Get functions that does the trick.

       

      I've got hundreds of images to deal with, and I don't relish manually entering the path data for every image.

       

      TIA

       

      Richard Hurley

       

      Grass Valley MultiMedia

        • 1. Re: container field pathname
          jormond

          How are the images stored? Directly in the container filed, as a reference, external containers?

           

          See if this helps: FileMaker Pro 15 Help

           

          If they are stored as a reference, this will get you the path if you use the "content" attribute.

          • 2. Re: container field pathname
            schamblee

            GetAsText(TheContainerField) will also get you the path, if the file is stored as a reference.

            1 of 1 people found this helpful
            • 3. Re: container field pathname
              RichardHurley

              Thanks for the suggestion, shamblee.

               

              The pictures are stored as references.  I tried this in the calculation field where I want to display the path to the image:

               

              GetAsText(images::baseImage)

               

              (where images is the name of the table and baseImage is the name of the container field).

               

              I get the pathname returned, but I get some extra stuff, too.

              Screen Shot 2016-06-25 at 2.01.43 PM.png

               

              Bonus data! I get the pixel size for free!

               

              Looks like I have a date with FMP's text parsing functions. And I'll try Joshua Ormond's suggestion,too.

               

              Thanks for the help! I love working in FMP, but I don't get to do it often. Having the FMP Community as a resource is a lifesaver.

               

              RH

               

              Update:

               

              GetValue ( GetAsText(images::baseImage) ; 2 ) seems to do the trick.