3 Replies Latest reply on Feb 21, 2014 11:56 PM by keywords

    Convert a file's path to type.

    wesfolio

      I'm attempting to cusomize the Content Management database that came with FM13.

      I wish to generate the file's path as type.

      Why? Because I'm burning image files onto discs.

      If the catalog can tell me that a certain image is located on "Disc 26" in folder "Images 01" for example, that would make it work for me.

      The container feature can input the name and date of the file, but not the file's path.

      I'm hoping that when I drag an image into the database, I can get the file's path to automatically enter into a field.

      Please advise.

       

      thanks,

      Wes

        • 1. Re: Convert a file's path to type.
          mark_b

          Hi Wes,

           

          I have needed to get the full file path for several solutions.  What I do is use a free plugin (BaseElements) that has a "BE_SelectFile ("Your Prompt") function that opens a file selection window where you can navigate and select the file you want to import.  The function returns the full path to the file selected.  There are other functions that you can use in the plugin.  http://www.goya.com.au/baseelements/plugin

           

          Cheers, Mark

          • 2. Re: Convert a file's path to type.
            keywords

            One way is to create a calc field (or autoenter by calc) using:  GetAsText ( File Container )

             

            Note, however, that the File Container field in the Content Management starter solution is set to standard storage only (ie. old style FM storage, not either of the external storage options introduced into FM12), so:

             

            1.     If you drag a file into the container the default behaviour is to store the file inside the database, so the result returned will simply be the file name (since the filepath is, in effect, the field itself).

            2.     If you insert the file via the Insert > Picture… menu you have the option to store only a reference. If you use this option the result returned will include the filepath showing the file's current location.

            3.     If you set the File Container field to one of the external storage settings, then the result returned will reflect that, regardless of whether you drag the file into the field or insert via the menu—as long as you uncheck "store only a reference".

            4.     Even with external storage set, if you insert via the menu and check the "store only a reference" option this will override your external storage settings and the result returned will be as per 2 above.

            • 3. Re: Convert a file's path to type.
              keywords

              In FM13 you can also use the calc:  GetContainerAttribute ( File Container ; "externalFiles" )

               

              This delivers the filepath only without the other values included in GetAsText ( File Container ).