The function below will describe how to append a subfield to the end of a field within the record. If you would like to add a subfield to a specific position within a field in accordance with schemas like MARC21, then follow the Add Subfield by Position workflow listed further down on this page.
3. Enter the field and subfield code followed by the data you would like MarcEdit to search for and replace or delete. If you do not enter anything, the search will capture everything within the particular field$subfield entered.
4. Next enter the text you would like added to the subfield. If you are simply looking to delete a particular subfield, be sure it is entered as above but do not enter anything in the Replace with box. Below is a table outlining the implications of various Search Options when checked:
Option |
Definition |
New subfield only |
Automatically adds subfield with specified data to each record within the file |
Add Subfield if not present |
Only adds subfield if that subfield does not exist in the record |
Delete subfield |
Removes specified subfield. Be sure to click Remove Text instead of Replace Text |
Delete duplicated subfield | Removes dulicated subfield. |
Match case |
Will match case when searching for text in subfield. Does not apply to replacing text |
Move subfield data |
Designed to subfield data into fixed length data field |
Use regular expression |
Specifies that search query in the field data text field is written as regular expression |
This function works within the same dialog box as the Editing Subfield Data workflow, but requires particular settings be chosen in order to delete a particular subfield. The settings needed are found in the workflow below.
3. Enter the field and subfield code that you would like to delete. If the subfield you would like to delete may be repeated within records, specify the text of the subfield in the “Field Data” text field. If you leave the “Field Data” field blank, it will delete each instance of that subfield. Once you have entered this information, select “Delete Subfield” from the Search Options menu. The only other options you need to worry about is the “Use regular expression” and “Match Case.” Both of these options determine how MarcEdit will perform the find function in order to delete the correct subfield data.
Because MarcEdit does not automatically conform to a schema like MARC21, added subfields will be appended to the end of the specified field. However, if you would like to add subfields in a particular position within a datafield you have to search using a special syntax. The steps are outlined below.
Below is an example of how this notation would be entered if I wanted to put a GMD into the 245 field, though the syntax would be the same for adding any subfield to any field.
While the text field is truncated, this entry into the Subfield text box states that MarcEdit will put the new $h field (plus whatever data follows it) into the data field after the a (if present) or p (if a is not present) but before subfield c. To conditionally add the subfield only if not present, be sure the “Add subfield if not present” box is selected. To add to all records, check “new Subfield only.” When you are ready, click “Replace Text.”