3 Replies Latest reply on Aug 29, 2013 7:17 AM by philmodjunk

    Inserting Files into Containers- Reference to file only?

    mchancevet@gmail.com

      Title

      Inserting Files into Containers- Reference to file only?

      Post

           Hi

           Newbie seeking advise here 

           I have been attempting to set up container fields to store word and excell docs so that I can double click in the field and open the file. In options I select store file externally and select "open storage" and provide a file pathway. On these settings I cannot open the files stored without exporting.

           When I select "Insert File" and highlight "store only a reference to the file this function works but the files are not stored in the new file location and cannot be attached to emails etc as the pathway is not specified as it would be if the files were stored as above.

           Thanks for any help. 

           Morgan

        • 1. Re: Inserting Files into Containers- Reference to file only?
          philmodjunk

               Basically correct, but:

               You can still attach "by reference" files to emails by extracting the file path from the container field. You are correct that you cannot use "by reference" as an option with externally stored files and that externally stored files cannot be opened in the default application without first exporting them. But this can be scripted so that all the user does is click a button.

          • 2. Re: Inserting Files into Containers- Reference to file only?
            mchancevet@gmail.com

                 Hi, 

                 Thanks for your advice. Is there an easy way to extract a file path from a container field? Mine are dynamic in that it will differ for each of my client record's documents.  I investigated 'get' functions but could not see one that seemed to fit the bill. Re-reading the container field section of FTS  (2-45) I see I had some misunderstandings about exporting from referenced only or stored externally containers. Seems FM13 would be advanced by allowing double clicking for ext. stored containers. 

                 Any sample scipt step ideas for above would be appreciated.Appreciate your help.

                 I'm using FM Pro 12 by the way but have access to FM 12 advanced if needed.

                 Morgan

            • 3. Re: Inserting Files into Containers- Reference to file only?
              philmodjunk

                   GetValue ( ContainerField ; valuecount ( ContainerField ) )

                   Will extract a file path to the file provided that it was inserted "by reference".

                   Some insertion methods generate 2 return separated lines of text, others three, but the last row of text will contain the file path.

                   For more on File paths, $Path variables and container fields see this thread and the exploration file that you can download from it: Exploring the use of a $Path Variable in Scripts