7 Replies Latest reply on Dec 11, 2009 6:12 AM by armen

    open file from location



      open file from location


      hello, im using filemaker 10 across the network using windows xp.


      We have embedded documents into a field, is there a way of opening these documents from its location? At the moment we're exporting locally which we'd prefer not to do.




        • 1. Re: open file from location

          Howdy Armen,


          I'm not 100% sure what you're after, but you can store a reference to the document rather than storing the document itself.    It is one of the options in the Insert File dialog.  "Store only a reference to the file".  This assumes of course that you are talking about a containor field.


          When you double click the containor field, it will open the file from where it resides using the program you've associated the file to (MSWord, PPoint, Adobe, etc.)


          Is this what you're trying to do?

          • 2. Re: open file from location

            Hi Ninja!


            Thanks for the quick response. Esseintially we're going to have 10 users accessing a network database, so if i'm storing a reference to the file, does that mean the file needs to be stored on a network mapped drive? Obviously if i'm referencing from local other users won't be able to open it.


            Is this the best way?





            • 3. Re: open file from location

              Howdy armen,


              I can't answer as to the "best" way since it varies according to how you do business and relate together.


              What I can say is that in order to open the file, the user must have access to the file (thus not local as you pointed out)

              At my company, the files to be opened this way are stored on the network.  PC users simply double click and have at it.  Mac users must make sure that they have logged into the network drive/folder (ie. have the icon on their desktop), then double-clicking opens it up for them.


              I do not know if storing said files on the same drive as the FMP application would work easily all the way around...it seems obvious that it would to my eyes...but I've not been in the situation to explore that option.


              Nonetheless, If the user could open the file 'manually', they should be able to open it through FMPapps with a containor field storing a reference to that file.  (Note the "IF"...its the key...they need access to the file to open it).

              • 4. Re: open file from location

                You'll need a "mounted drive" that provides access to the file on all your clients machines. In windows you can usually just map a drive letter that you point at the directory where your files are stored. The filepath in your container field must then correctly refer to the the "mounted drive" in order to open the file.


                If you have to move large numbers of such files to a different directory, there are ways to use Replace Field contents to update the references in the container fields to correctly link to the files in their new location.

                • 5. Re: open file from location

                  thanks guys, im mounting a new share for all our users so they have access to the same area... which command do i use to open file? Im using export file but it wants to save it locally first... open file seems to want to open a data source i cant specify the field...

                  • 6. Re: open file from location

                    Howdy Armen,


                    If the file is stored as a reference in the containor, double clicking on it will do the job.  If you want a command to do it, check out this thread...comment outlines a simple way to simulate a double-click within a script. 





                    If, for some reason, you want to do it a different way, use Get(SystemPlatform) to separate between PC and Mac, use OpenURL with the PC's and SendEvent for the Mac's.  Doing it this way, you will need to provide the path.

                    This can be done by setting a calculation field, result=text, and define it as = your containor field...this should dump the path reference into the field.


                    I would use comments way if it were up to me, but both options (and I'm sure others) are open to you.

                    • 7. Re: open file from location

                      thanks thats done the trick!