11 Replies Latest reply on Jan 28, 2012 2:07 PM by LaRetta

    How to attach folders onto individual files?

    youngguns

      Hello,

       

      I would like to attach folders to induvidual folders that relate to a person's file...i.e. a folder with a 3 different word documents in...can I attache these to the file, and if so how?

       

      Thank you!!!

        • 1. Re: How to attach folders onto individual files?
          Stephen Huston

          It is unclear what you want to do. The term "attach" has no standard meaning with a FileMaker data file.

           

          Are you wanting to store multiple documents in a container field of one table?

           

          Some dlarification and detail or example, please...

          • 2. Re: How to attach folders onto individual files?
            beverly

            I recommend the use of the Troi File plugin or theSuper Container plugin to "manage" files that need to be "attached" to records in your database. "file management" is best done with these plugins (or others).

             

            Beverly

            • 3. Re: How to attach folders onto individual files?
              youngguns

              Hi Stephen,

               

              I want to store folders containing word documents as part of a file on FM so that if I went to 'Joe Bloggs' file there would be a folder on there that had all his invoices in a folder that I can store word or pdf documents in.

               

              I hope that makes more sense,

               

              Thanks!!

              • 4. Re: How to attach folders onto individual files?
                MattLeach

                Another option that would not require a plugin would be to create a table for "documents" that contains a container field for the document. You could enter each document as a new record and have a relationship from your "persons" table to the "documents" table based on a primary key. The documents table could contain a set of fields for things such as document date, type, etc... which could help you perform searches in the future.

                 

                With this relationship each person could have multiple documents related. You could setup a portal to list the associated docs.

                 

                I've done this with our in-house system that was converted from another document management system.

                 

                I've also used the SuperContainer plugin on other prjects and that works great as well.

                • 5. Re: How to attach folders onto individual files?
                  comment

                  youngguns wrote:

                   

                  I want to store folders containing word documents as part of a file on FM so that if I went to 'Joe Bloggs' file there would be a folder on there that had all his invoices in a folder that I can store word or pdf documents in.

                   

                  You can store the name of a folder in a field of a record, and use the Open URL[] script step to open it.

                  Note that Filemaker will not create the folder for you on its own - i.e. without using a plugin or OS-level scripting.

                  1 of 1 people found this helpful
                  • 6. Re: How to attach folders onto individual files?
                    Stephen Huston

                    I agree with both Matt and Michael.

                     

                    You could use a combination of the two methods to store the path in a text field in related records for each file elsewhere on the disk/server so you have an unlimited number of documents which could be related to a name, one in each related record with a text field, and use the OpenURL process to get at them when needed.

                     

                    This has the advantage of not embedding the document-data within the file (for file size issues), while making the number of possible items open-ended for each name. That way you don't have to plan how many fields or repetitions to define, nor use containers with document-data storage.

                     

                    Stephen Huston

                    • 7. Re: How to attach folders onto individual files?
                      youngguns

                      Hi,

                       

                      That is really helpful, thank you.  So I could add the title 'personal info' on the file and then when it's clicked create a link to the folder, which is stored elsewhere on the system.  Would you be able to explain how to do this step by step? I would REALLY appreciate it!

                       

                      Thank you!!!

                      • 8. Re: How to attach folders onto individual files?
                        comment

                        No, not exactly. See if the attached helps to make it clearer.

                        • 9. Re: How to attach folders onto individual files?

                          On creating a folder ... some companies shy from plugins.  And if you really want to create the folders and if your needs are simple it can be handled natively (at least on Windows).  To test, create a global text field with this:

                           

                          cmd /c md C:\Test

                           

                          This is an old DOS batch string simply saying to make a directory and then stop.  Then create a single script-step with Send Event [ by calculation; and point to that global].  It will create a folder called "Test" at the root of your drive C (on Windows).  Understanding this, it is then simple to use calculation logic to create your folders (at least it works on Windows, I have yet to test it on my Mac).

                           

                          Script can test for platform and respond appropriately.  Mac uses front slash and windows uses backslash, so functions such as Get(DesktopPath) will need to have their slashes reversed if on Windows.  There are other things which can trip you also.  If you use Get(DesktopPath) , it contains spaces (Documents and Settings) and the command line will interpret the space as a 'space' in its command line and create a folder called 'and.'  

                           

                          Nice demo, Michael. 

                          • 10. Re: How to attach folders onto individual files?
                            sporobolus

                            on 2012-01-27 12:20 LaRetta wrote

                            On creating a folder ... some companies shy from plugins.  And if you really want to create the folders and if your needs are simple it can be handled natively (at least on Windows).  To test, create a global text field with this:

                             

                            cmd /c md C:\Test

                             

                            This is an old DOS batch string simply saying to make a directory and then stop.  Then create a single script-step with Send Event .  It will create a folder called "Test" at the root of your drive C (on Windows).  Understanding this, it is then simple to use calculation logic to create your folders (at least it works on Windows, I have yet to test it on my Mac).

                             

                            Script can test for platform and respond appropriately.  Mac uses front slash and windows uses backslash, so functions such as Get(DesktopPath) will need to have their slashes reversed if on Windows.  There are other things which can trip you also.  If you use Get(DesktopPath) , it contains spaces (Documents and Settings) and the command line will interpret the space as a 'space' in its command line and create a folder called 'and.'

                             

                            just a slight caution that when FileMaker generates a filespec, it uses its own

                            format which uses only forward slashes and which doesn't work directly in the

                            host OS shell (nor in AppleScript); so you have to do a different

                            transformation on the return from e.g. Get(DesktopPath) depending whether it

                            will be used in an AppleScript, a Mac shell script, or a DOS shell script

                             

                            i won't repeat the dozens of examples from the archive or elsewhere, but it's

                            worth mentioning there are several CFs at briandunning.com that will convert

                            the path format for you

                            • 11. Re: How to attach folders onto individual files?

                              Thank you, Steve.  We can never have too much information.