From Dwayne Wright PMP, PMI-ACP
Certified FileMaker Developer
The Export Field Contents script step takes the contents of a particular field and exports it to a desired location. Although not exclusively used for container fields, this script steps really shows off its flexibility when used in conjunction with container fields. This is because a container field can hold just about any type of file, such as a graphic, a Word document, a sound file or even another FileMaker file. Many developers, this one included, will occasionally use a FileMaker table made up of container fields exclusively for media storage as it pertains to some business process. For example, we may use linked container fields in a solution to contain the scans of packing lists that come in from a shipping/receiving dock. The person in the receiving department and easily link these scanned documents to their associated purchase order. This way a user can use FileMaker as their digital file cabinet and never have to leave their desk to get the “hard copy” of a transaction.
Add to the mix the ability to scan documents directly into a container field by using a plug in like InsideScan and you can come up with some very interesting workflow practices for storing “hard copies” of transactions within a FileMaker file.
Anyway, back to the topic of the Export Field Contents Script Step...
The Export Field Contents script step has the two options of Specify Target Field and Specify Output File. The first option simply allows you to specify what field you want FileMaker to export. The second option is used to define the name of the exported file and the location it is exported to. The later option is quite interesting in the way it can be implemented by the FileMaker developer.
By default, the user is asked to manually hard code the destination for the exported field contents. This is one area in which the ability to use the calculation dialog to define a dynamic location is sorely missed... or ... is it? Although you cannot use a calculation in the box that defines the destination, it will accept a script variable. A script variable can use the calculation engine to determine its value. So you can use the Set Variable script step preceding the Export Field Contents script step and basically have the ability to dynamically determine where the exported field contents will appear.
Here you can see the dialog box that allows you to determine the location of the exported file and the file name it will have when complete.
More info about the author and FileMaker in general, contact me at firstname.lastname@example.org.
© 2008 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.