1 Reply Latest reply on Sep 4, 2013 4:36 PM by philmodjunk

    how do you get file name only

    dvdlghtn

      Title

      how do you get file name only

      Post

           I have a data base that documents photographs by various photographers.

           I have a container field for storing an image of their photographs called 'photo image'.

           What I need is a field that will show me the file name of the imported image. 

           All I can manage is - 

           GetAsText ( photo image )

           But this gives me more than just the file name all of which I do not need.

           Is there a way to get just the file name only?

           Thanks for any help.

        • 1. Re: how do you get file name only
          philmodjunk

               The data returned by GetAsText ( photo image ) will vary depending on the insertion method used and the storage options specified for the container field.
               Let ( [ T = If ( LeftWords ( YourTable::ContainerFIeld ; 1 ) = "remote" ;
                                     GetValue( YourTable::ContainerFIeld ; 1 ) ;
                                     GetValue ( YourTable::ContainerFIeld ; ValueCount ( YourTable::ContainerFIeld ) )
                                   ) ; // If
                         L = Length ( T )];
                         If ( LeftWords ( T ; 1 ) = "remote" ;  Right ( T ; L - 7 ) ; Right ( T ; L - Position ( T ; "/" ; L ; -1 ) ) )
                   ) // Let

               will extract the file name for all the different possible variations except for Filemaker 11 inserted objects which do not make any text at all available.