I’m not sure how I’ve missed creating something like this for so long, but it took a question from a cataloger to help me crystalize the need for a new feature. Here was the question:
Add an 856 url to all records that uses the OCLC number from the 035 field, the title from 245 $a, and the ISSN, if present. This will populate an ILLiad form with the publication title, ISSN, call number (same for all records), and OCLC number. Although I haven’t worked it in yet, the link in our catalog will also include instructions to “click for document delivery form” or something like that.
In essence, the user was looking to generate a link within some records — however, the link would need to be made up of data pulled from different parts of the MARC record. It’s a question that comes up all the time, and in many cases, the answer I generally give points users to the Swap Field Function — a tool designed around moving data between fields. For fields that are to be assembled from data in multiple fields — multiple swap field operations would need to be run. The difference here was how the data from the various MARC fields listed above, needed to be presented. The swap field tool moves data from one subfield to another — where as this user was looking to pull data from various fields and reassemble that data using a specific data pattern. And in thinking about how I would answer this question — it kind of clicked — we need a new tool.
Build New Field:
The build new field tool is the newest global editing tool being added to the MarcEditor tool kit. The tool will be available in the Tools menu:
And will be supported in the Task Automation list. The tool is designed around this notion of data patterns — the idea that rather than moving data between fields — some field data needs to be created via a specific set of data patterns. The example provided by the user asking this question as:
- http://illiad.mylibrary.org/illiad.dll?Action=10&Form=22&PhotoJournalTitle=[Title from 245$a]&&ISSN=[ISSN from 022$a]&CallNumber=[CallNumber from 099$a]&ESPNumber=[oclc number from the 035]
While the swap field could move all this data around, the tool isn’t designed to do this level of data integration when generating a new field. In fact, none of MarcEdit’s present global editing tasks are configured for this work. To address this gap, I’ve introduced the Build New Field tool:
The Build New Field tool utilizes data patterns to construct a new MARC field. Using the example above, a user could create a new 856 by utilizing the following pattern:
=856 41$uhttp://illiad.mylibrary.org/illiad.dll?Action=10&Form=22&PhotoJournalTitle={245$a}&ISSN={022$a}&CallNumber={099$a}&ESPNumber={035$a(OcLC)}
Do you see the pattern? This tool allows users to construct their field, replacing the variable data to be extracted from their MARC records using the mnemonic structure: {field$subfield}. Additionally, in the ESPNumber tag, you can see that in addition to the field and subfield, qualifying information was also included. The tool allows users to provide this information, which is particularly useful when utilizing fields like the 035 to extract control numbers.
Finally, the new tool provides two additional options. For items like proxy development, data extracted from the MARC record will need to be URL encoded. By checking the “Escape data from URL” option, all MARC data extracted and utilized within the data pattern will be URL encoded. Leaving this item unchecked will allow the tool to capture the data as presented within the record.
The second option, “Replace Existing Field or Add New one if not Present” tells the tool what to do if the field exists. If left unchecked, the tool will create a new field if this option is not selected (were the field defined in the pattern exists or not). If you check this option, the the tool will replace any existing field data or create a new field if one doesn’t exist, for the field defined by your pattern.
Does that make sense? This function will be part of the next MarcEdit release, so if you have questions or comments, let me know.
–tr