FileMaker Pro as Document Manager - File Maker

Many full-sized FileMaker-based database systems keep track of contacts, companies, invoices, purchase orders, products, and other record types just fine. But many clients also ask to be able to link external documents to, say, a contact record which can then be accessed from that FileMaker record. For instance, you might want to be able to see all documents sent to a particular contact from within that person’s database record. Further, you might like to be able to link new documents in and then be able to access them in their native application from within FileMaker Pro. Or, perhaps you want to be able to attach PDFbased drawings, schematics, or fact sheets to records in your products database.

If this describes what you want to do, you need a document management system, and FileMaker Pro (combined with a few popular plug-ins) can provide this functionality. In this section you’ll learn how to set up a document management system for your FileMaker database system.

Document Management Example

  1. In the earlier folder, you’ll find a Document Management folder. Open it and open Launch.fp5. You’ll see the familiar contact management system and be left on a detail screen showing all related linked correspondence or documents for Chris Kubica’s contact record (though no documents will be linked to this contact yet).
  2. Document Management Example

    The first thing you need to do is to choose where you would like to store your linked documents. In the pink field below the document portal, next to the words “Where to Store Your Documents?” enter the folder on your hard drive (or, in Windows, elsewhere on the network) where all linked documents for this database system will be stored. Here’s what a path to a folder looks like, depending on your platform:

    • Windows: C:LinkedDocs
    • Mac: Mac HD:Linked Docs
    Enter the path to the folder you’ll use. Next, make sure to create that folder at that exact location on your hard drive/network. After that’s done, you’re done setting up.
  3. Now click the Link Document button. You’ll be asked which ocument you want to link. Choose something and click the Open button.
  4. Next you’ll be asked whether you want to link a copy of that document to the linked documents folder, leaving the original where it is, or move the original in its entirety to the linked documents folder. For now, choose the Copy button. After that, the document is copied to the linked documents folder and a record will appear in the portal showing that there’s now a linked document for this contact. If you click on the portal row, the document will launch in its native application. If you click the little trash can, it will delete not only the portal row but also the actual linked document (from the linked documents folder).

How It Works
Now take a look under the hood and see what’s happening here. Go to Contact.fp5 and look at the “Link a Document” script, which looks like this (comments on what the script is doing are shown in between the code sections):

First you set a global in Document.fp5 so you know which contact this new linked document is associated with.

Above are several calls to the Troi File Plug-in that have to do with asking you to specify which file you’ll be linking to.

Here you’re just creating the new Document.fp5 record and bringing its ID back to the Contact.fp5 database . . .

Above is where the destination for the new linked file is set and then a call is made to the plug-in to actually move the file (if that’s what the user chose to do instead of making a copy of the file).

The above sequence is the same as when moving a file but instead of moving it from its original place to the linked documents folder, only a copy is moved to that folder.

Go to Layout ["Correspondence"] Go to Field []

Notes and Caveats
You may have noticed that as the linked files are moved to the linked documents folder they are renamed using a serial number scheme like “LINK10014.doc”.

This isn’t something you have to do, but it might be safer because this way there aren’t really two files on your computer named the exact same thing. Also, if someone finds his or her way to the linked documents folder, it’s harder for that person to find sensitive documents.

Here are some other caveats and ideas regarding managing documents like this in FileMaker Pro:

  • You should not let users have network access to the linked documents folder.
  • Only allow access by clicking a document link in FileMaker. If users are able to somehow rename, move, or delete documents from the linked documents folder without going through FileMaker, the integrity and order of your document management system will be compromised (links will be lost and so on).

  • If your company has a staff of one, you may not need to copy documents to another folder; you can just link to them. If this is the case, modify the scripts (using the documentation that comes with the Troi File plug-in as a guide) to only capture the paths to your linked documents in each Document.fp5 record. Remember, though, that if you move or rename the documents the links in FileMaker will be lost.
  • Cross-Platform compatibility: When looking through the scripts and field names of these example databases, note that there are some funky steps you need to take to make sure that your solution is cross platform compatible if you require it to be. If not, you can remove all these safeguards (like checking to see if the linked documents folder’s path uses “” or “:”, indicating a Windows- or Mac-type path, respectively).
  • But keep in mind that the linked documents folder needs to be somewhere that everyone on the network has access to. Make sure to test document linking from many workstations before rolling out the solution.

  • Error checking: The scripts do a little bit of error checking, but they could do a lot more. For instance, they could check for the presence of the Troi File Plug-in first; check access to the linked documents folder; see whether a certain file name already exists in Document.fp5; check to see whether any errors were returned from the plug-in during the linking process; and so on.
  • Idea: You could use the Troi Dialog Plug-in to ask the user either what they’d like to name their newly linked document or which linked documents folder they’d like to use.
  • Idea: By capturing the extension of a document (.doc, .xls, .txt, and so forth) you can determine the document’s type and provide a meaningful icon in the contact’s linked document portal so users know at a glance.
  • Idea: You could provide a mechanism to link documents to many contacts by creating a many-to-many relationship between Document.fp5 and Contact.fp5 (or Document.fp5 and another of your database system’s databases . . . projects, companies, invoices, the sky’s the limit).
  • Microsoft Office integration: Instead of just linking to existing documents, you could create a mechanism for creating brand-new documents like a memo, letter, or fax based on Microsoft Word (for the template) and FileMaker Pro (for the merge data, either via export/import or ODBC) integration. For instance, you could launch a Word .dot template file that is prebuilt to query FileMaker on launch (via ODBC) for merge data. Further, you could attach a macro of some kind to the Word template such that, after launching and merging in the data, the new merge document could automatically save itself to the network, email or fax itself, create a PDF of itself, or whatever you desire.

The people at Datavations seem to have come up with a FileMaker Pro /Microsoft Office integration solution just like the one described here. It’s pretty cool. Not only does its kit link with Word but also with Microsoft’s Excel, Outlook, and Project.

EZxslt
Speaking of generating Word documents containing merged data from a FileMaker Pro database, have a look at EZxslt developed by Chaparral Software & Consulting Services. It takes FileMaker fields that are populated with data and creates a Microsoft Word document, which merges the data with a Word template (which you set up beforehand). The great thing, though, is that it requires no knowledge of XML (though that’s what’s powering this stellar solution) and the Word template is relatively quick and easy to set up, as is the export of XML-formatted data from your FileMaker database.

EZxslt has a bright future; never before has it been easier to merge File- Maker data into templates that you can use to generate personalized contracts, quotes, invoices, menus, tasks lists you name it using the power of Microsoft Word.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

File Maker Topics