Appendix B: Scripting

spacer gif

In order to keep data entry to a bare minimum, the database makes extensive use of FilemakerPro 's "Scriptmaker" to automate the creation of values for several key fields. For example, in both SeriesDB and SubObjectDB, a parent-child relationship between records defines the structure of a collection or object. To resolve the parent - child relationship into a sequential numbering system which counts of all subseries or all subobjects in the order of their appearance in the hierarchy, the database triggers a two page nested looping script. Without the script, a display of a collection or object hierarchy within one portal would not be possible. The script drills down the parent-child relationship, numbering all records along the way, until it finds no more children. At that point, it starts counting siblings, while always looking out for further children related to one of the siblings. When all siblings and their children (and children's children, etc) of a level are counted, the script backs up to the last record with uncounted children and resumes the combined drilling for children and the lateral quest for siblings.

Another key-script saves data entry time by allowing the user to store the request for versions (master, derivative and transcription files) on an object-level. After all subobjects have been defined, the script publishes versions for each subobject to the imaging and transcription database. The script loops through all the subobjects of an object, determines whether imaging and/or transcription have been requested, and, if yes, writes the appropriate number of version files to the relational imaging and/or transcription database. In essence, each entry for a subobject begets the number of versions requested. For a sketchbook consisting of three pages and a request for a master, access and thumbnail file plus transcription, the script creates nine entries in the relational imaging database and three entries in the relational transcription database.

The most intricate, yet ultimately most rewarding script of the database exports the interchange file format (EAD) to a textfile. During data entry, the database prepares discreet parcels of EAD mark up for all collection levels and all objects. Utilizing a free FilemakerPro plug-in called Tool-Box, these parcels of code can be written to an external text file. The script's main responsibility lies in discovering the chunks of code in the correct order. First, the script picks up the EAD frontmatter and all descriptive information for the umbrella collection from a calculation field in SeriesDB. Utilizing sequential numbering for the collection and object hierarchy, the script then populates the EAD container list by working its way down the collection hierarchy levels within the SeriesDB. At each level, a subroutine scans for parcels of item-level mark-up in the SubObjectDB, and inserts them into the tex tfile. Anybody who has tried to automated EAD mark-up knows that one of the main headaches consists in getting the different component levels (<c0x>) to close out correctly. In DAMD, the script responsible for maintaining the sequential numbering of the collection levels also features a subroutine which memorizes all open component tags, and writes the close-out tags to the mark-up parcels as appropriate. The script exporting MOA2 mark-up operates in the same way, only one level deeper down in the hierarchy (within the object instead of within the collection).


Back  |  Appendix A  |  Appendix B