1 2 Previous Next 17 Replies Latest reply on Feb 2, 2015 4:56 PM by wimdecorte

    Document Management System

    darrynpeterlowe

      I'm having a little trouble with creating a document management system.

       

      I can create records etc and drag files into the container easy enough that's not the problem. But there's three things I want to do differently.

       

      The first is to have a file open dialog that then copies the file into a separate location dedicated specifically to a folder.

       

      The second is instead of using the container to display the document I want to be able click a button that will open that document in whatever application is assigned to open it.

       

      The third is to have that document be able to be selected and linked to other tables. For example, I'm trying to create a call management system for field engineers and they will need access to a variety of documents for different customers. So say I create a new job for ABC Corporation and it is to update a particular application that is kind of tricky to setup but it has been documented before and stored in the document management side of things. I would then have the document system filter down everything only to ABC Corporation, I would then find the document I need, and I would link it to the job I have just created. Then when the engineer goes to site to work on this job, all the information they need is right there in the application.

       

      Has anyone got any tips and pointers or even heavily commented solutions so I can understand what is going on?

       

      Thanks for any help.

        • 1. Re: Document Management System
          wimdecorte

          darrynpeterlowe wrote:

           

           

          The first is to have a file open dialog that then copies the file into a separate location dedicated specifically to a folder.

           

           

          You mentioned drag and drop; is that how your users would normally select files?

          Is this a solution hosted on FMS?

          The separate location; is this a network share accessible to all users?  And if so - are you expecting the users to work with those documents outside of FMP, liking finding them outside of FM and opening outside of FM?

           

          One option would be to let your users drag and drop into a global container and then use the "export field contents" script step to show the dialog that you are after.

           

          Note however that this would not link the document to the record.  If the location is not something that the user should be able to choose but should be calculated based on the record's data then you can use the "export field contents" but not open it up to the user.

          • 2. Re: Document Management System
            wimdecorte

            darrynpeterlowe wrote:

             

             

            The second is instead of using the container to display the document I want to be able click a button that will open that document in whatever application is assigned to open it.

             

             

            The Export Field Contents script step will do that, it has an "automatically open" option, which hands the request over to the OS that will attempt to open it with the associated application.

            But it only work if the document is stored in a container in the database.  You don't have to show the container but it has to be there.

            If the document is not stored in the database, a Send Event script step that points to the path & filename of where the document is stored will work.

            • 3. Re: Document Management System
              wimdecorte

              darrynpeterlowe wrote:

               

              The third is to have that document be able to be selected and linked to other tables. For example, I'm trying to create a call management system for field engineers and they will need access to a variety of documents for different customers. So say I create a new job for ABC Corporation and it is to update a particular application that is kind of tricky to setup but it has been documented before and stored in the document management side of things. I would then have the document system filter down everything only to ABC Corporation, I would then find the document I need, and I would link it to the job I have just created. Then when the engineer goes to site to work on this job, all the information they need is right there in the application.

               

              Has anyone got any tips and pointers or even heavily commented solutions so I can understand what is going on?

               

               

              This a requirement needs a lot more weeding out but it is entirely doable.

               

              You'll need keywords / tags and possibly also the notion of sets of documents.

               

              Good document management systems are complex and expensive (think about versioning of the documents, permissions on who gets to update, notifications of updates, fast searching across all documents, possibly content searches,...).

              • 4. Re: Document Management System
                darrynpeterlowe

                I'm thinking in terms of the desktop side where clicking on a button would bring up the standard open dialog rather than allowing users to drag and drop into a container.

                 

                So from the user's local machine it would copy it either as a BLOB (is that possible in FM?) or copy it to the server as a file in a location created by the database.

                • 5. Re: Document Management System
                  wimdecorte

                  darrynpeterlowe wrote:

                   

                  I'm thinking in terms of the desktop side where clicking on a button would bring up the standard open dialog rather than allowing users to drag and drop into a container.

                   

                  Yep; use the "Insert File" script step.

                   

                  One of the important questions is whether you expect users to be able to interact with the documents outside of FM, for instance, a user wants to find a document without opening the FM solution.  Is that your expectation?

                  • 6. Re: Document Management System
                    Mike_Mitchell

                    Piggybacking on what Wim said, your "find my document from a previous job and link it to this one" problem is not one of document storage per se, but of how you construct your database.

                     

                    For example, you might have a "keywords" table that has a one-to-many join back to the documents, allowing users to attach some number of keywords to documents. You also may have a many-to-many join from Documents back to Companies, linking the documents back to the companies they're associated with. Or, you may have a join from Documents back to the Projects, and then through the Projects back to the Companies.

                     

                    This is all part of your data model, which has little to do with the fact that you're doing document storage and retrieval.

                    • 7. Re: Document Management System
                      DavidJondreau

                      And keep in mind that if you store the file directly in a container field and useExport Field Contents, then saving the edited document in the system application won't save the edited document in your container field, you'll still have the original. Which may or may not be the desired result. If it's not the desired result, using external storage is a better choice.

                       

                      I'd say external storage is a better choice anyway.

                      • 8. Re: Document Management System
                        Stephen Huston

                        DavidJondreau wrote, in part:

                        I'd say external storage is a better choice anyway.

                         

                        Keeping in mind that any editing of files/data in the external storage area through direct OS-level or non-FMP applications will cause the changed files to quit working as part of the FMP system -- reporting them as "tampered data."

                         

                        The entire import/export of data files with container fields needs to be scripted within FileMaker, not accessed via open storage to modify the files outside of FileMaker. After any export-field-contents, opening/edit of exported file, the file needs to be reimported into the FM container. I don't think external storage would make any difference to implementing this process, but nobody should have direct access to external container storage areas, IMHO.

                        • 9. Re: Document Management System
                          wimdecorte

                          I don't think external storage would make any difference to implementing this process, but nobody should have direct access to external container storage areas, IMHO.

                           

                          Not just your opinion.  FMI has explicitly warned us to treat externally stored container data just like regular live FM files.

                           

                          This part of the thread is why scripting a proper "versioning" is both important and not straightforward.

                          The best approach is to use a check-in / check-out workflow so that:

                          - documents as marked as check-out for editing

                          - other users will then be warned that this may not be the most recent version

                          - when an edited document is uploaded, mark it with a new version # in the record, de-activate all previous versions

                          - (if you can; index the content of the new document so that you can diff it against the old one)

                          • 10. Re: Document Management System
                            DavidJondreau

                            Sorry, I mixed up my thoughts.

                             

                            External storage doesn't solve the problem of editing.

                             

                            Storing a reference to a file in a container field may be a better solution if editing is required.

                             

                            Storing the file itself in a container field is a bad idea for any document management system.

                            • 11. Re: Document Management System
                              darrynpeterlowe

                              Thank you for your thoughts guys.

                               

                              Basically what I wanted was to have references to a document that when clicked would open in whatever application is used to handle those files. Truthfully I really want the files to be PDFs but I don't want them to be stored in a Container because they don't look right. As PDFs though they will be non-editable anyway so that's not an issue.

                               

                              However, I want the ability for the user to upload the file and create records to that file from within the FM solution itself so that the user doesn't have the ability to get the filing wrong. They simply choose the client, choose the type of document (software, audit, user, etc), add a name, then click the upload button which opens a file chooser dialog and then copies the file to the required location.

                               

                              The solution then creates a link to that file that when the engineer comes along they won't have the ability to upload documents just click the link to download the document to whatever device they are using be it iOS or Mac/Windows machine.

                               

                              Does that make sense? I'm not sure if I'm explaining it correctly.

                               

                              Thanks for the help so far guys.

                              • 12. Re: Document Management System
                                Mike_Mitchell

                                "However, I want the ability for the user to upload the file and create records to that file from within the FM solution itself so that the user doesn't have the ability to get the filing wrong."

                                 

                                I don't know what this means. What do you mean, "create records to that file"? What do you mean by a "file"? Do you mean the document the user is uploading? Do you mean the FileMaker database? What does, "create records to that file" mean, exactly?

                                 

                                "They simply choose the client, choose the type of document (software, audit, user, etc), add a name, then click the upload button which opens a file chooser dialog and then copies the file to the required location."

                                 

                                Exactly what do you mean by, "required location"? Are you trying to use a file share, or do you really care where on the server the file lives? This is an important distinction. If you're using managed container fields, then you won't have free reign to store the files wherever you want on the server (although you do have some flexibility). Further, you'll need to manage all the asset upload / download / access through the FileMaker interface (because, as has already been mentioned, touching the files in any other way will result in Bad Things happening). If, OTOH, you want to use a file share, then you'll need to use some OS-level scripting (perhaps through PHP or another interface) to move the asset into place and then update a reference field inside FileMaker.

                                 

                                It sounds like you really don't need for users to be able to edit the assets, which is good news. All you really need is for user group A to upload assets and link them to clients, and for group B to be able to download / view documents, which you want to do outside the FileMaker container fields. If that is correct, then really all you need is:

                                 

                                1) Proper privileges set in the Documents table (best practices suggests a completely separate file for this function)

                                2) Completely scripted interface (because you don't want users dragging / dropping the assets into the containers)

                                3) External / managed storage on the containers

                                4) A proper data model that connects clients to documents.

                                 

                                The "link" to the document is completely managed by the external container process in FileMaker. You can define the path for the assets (which should include the unique ID of the Document record), and FileMaker will automatically create the necessary folder structure on the server. Use the appropriate script steps for the interface. Wim has already mentioned the Export Field Contents script step for downloading the asset. Use the various Insert script steps to push the asset into the container (you can use a specific step such as Insert PDF for a narrow option, or just Insert File if you want to allow more flexibility).

                                 

                                That should at least get you started. HTH

                                 

                                Mike

                                • 13. Re: Document Management System
                                  darrynpeterlowe

                                  Hi guys, sorry I haven't been more vocal on this topic I've been rather busy with day to day work.

                                   

                                  I definitely want to go the external storage route with the documents being stored on a server. This way we can edit the documents if needed but not have to add a new entry for each update of the document. That just makes no sense doing it that way.

                                   

                                  I want to clarify something that I need help with though.

                                   

                                  Say I'm working on a document and for the sake of ease of access while writing this document I have it stored locally on my laptop while I'm writing it. Now I'm finished my document I want it in the document management system. I can't just add an entry to my document on my machine because the link will disappear when I go away from the network. This is why I want the ability to "upload" the document to the server in much the same way as you'd do on a webpage.

                                   

                                  I want to make it super simple because I don't want people to get it wrong. I want them to only have to worry about clicking on a button to invoke a file open window, then enter the details possibly using keywords, and the application will save that document to a specific folder based on the keywords given.

                                   

                                  So say my document was a repair manual for an Apple MacBook Pro Early 2011. It would have the following information:

                                   

                                  Name: MacBook Pro Early 2011

                                  Keywords: Laptop, Apple, MacBook

                                  File: MBPE2011.pdf

                                   

                                  Once the information is entered the application then copies the file to the server into Laptop/Apple/MacBook/

                                   

                                  This way there is a centralised location for all documents on the server but separated into folders. The keywords themselves would probably be done based on dropdown menus of Type, Manufacturer, Model to force the correct locations and make sure they aren't changed by the user.

                                   

                                  I hope that sort of explains what I'm trying to do.

                                  • 14. Re: Document Management System
                                    Mike_Mitchell

                                    You can define the pathname when you set up the external storage. Yes, you can do it based on a calculation, and yes, it can include dynamic information (such as the content of one or more fields).

                                     

                                    I don't see any major issues with what you're outlining, except that you need to implement a check out / check in mechanism to prevent two users from attempting to edit the same document at the same time. Otherwise, you'll wind up with version mismatches and users will complain about their edits being overwritten (rightfully so).

                                     

                                    And, to reiterate: Make sure all downloading and uploading happens through the FileMaker interface ONLY. Do not allow any kind of tampering through the OS file structure. You will corrupt the external document links and Bad Things will happen.

                                     

                                    Mike

                                    1 2 Previous Next