Skip to main content
OCLC Support

Replace a LHR field string

Discover how to replace a LHR field string in an existing LHR.

Replace a string in an existing 852 field

  1. Navigate to Record Work Lists > LHR and then click the Record Work List ID for which you want to replace a string in an existing 852 field.
  2. From the LHR - Record Work List screen, select Base Script from the Edit Action drop-down list.
  3. Select Replace String in 852 or 876 Note from the Script Name drop-down list.
  4. Select 852 from the Field drop-down list.
  5. Select a subfield from the Subfield drop-down list.
    • $x - Nonpublic Note (default)
    • $z - Public Note
  6. Select a matching option from the Matching Options drop-down list.
    • Begins with
    • Contains (default)
    • Ends with
    • Equals
  7. (Optional) For Capitalization, select Match Case to ensure that found text matches the letter case of the string entered in the Find This Content form field.
  8. Enter the existing string text in the Find This Content form field.
  9. Enter the replacement string text in the Replace with This Content form field.
  10. Select the LHR record(s) for which you want to replace a string.
     Note:
    • To select all records on the current page of results, select the check box at the top of the table.
    • To select all records in the work list, click Actions > Edit > All Target Records.
  11. (Optional) Preview selected records with the script change.
    1. Select up to 25 records to which you want to apply the script change.
    2. Click Actions > View Selected Record(s) > Preview Record(s) after Edit Action Applied. The View LHRs - Preview Record(s) after Edit Action Applied screen displays the selected records with the script change applied and includes any validation errors.
    3. Click View Current Record(s) to view the selected records in their current state. From the View LHRs - Current Record(s) screen, click Preview Record(s) after Edit Action Applied to return to the View LHRs - Preview Record(s) after Edit Action Applied screen.
    4. Once you have confirmed the script changes appear as expected, click Go Back.
    5. (Optional) Select a different set of records (up to 25) and repeat steps a through d.
  12. Click Actions > Edit > Selected Target Records.
  13. Click Apply in the Apply LHR Script to Selected Record(s) dialog window. The script running process is asynchronous. The time it takes to run varies depending on how many records you are editing. While the process is running, you can perform other actions in Record Manager outside of the LHR tab in the Record Work Lists screen.

    A confirmation message appears identifying how many records successfully updated or failed to update when the script has finished running.

Replace a string in an existing 876 field

  1. Navigate to Record Work Lists > LHR and then click the Record Work List ID for which you want to replace a string in an existing 876 field.
  2. From the LHR - Record Work List screen, select Base Script from the Edit Action drop-down list.
  3. Select Replace String in 852 or 876 Note from the Script Name drop-down list.
  4. Select 876 from the Field drop-down list.
  5. Select a subfield from the Subfield drop-down list.
    • $x - Nonpublic Note (default)
    • $z - Public Note
  6. Select a matching option from the Matching Options drop-down list.
    • Begins with
    • Contains (default)
    • Ends with
    • Equals
  7. (Optional) For Capitalization, select Match Case to ensure that found text matches the letter case of the string entered in the Find This Content form field.
  8. Enter the existing string text in the Find This Content form field.
  9. Enter the replacement string text in the Replace with This Content form field.
  10. Select the LHR record(s) for which you want to replace a string.
     Note:
    • To select all records on the current page of results, select the check box at the top of the table.
    • To select all records in the work list, click Actions > Edit > All Target Records.
  11. (Optional) Preview selected records with the script change.
    1. Select up to 25 records to which you want to apply the script change.
    2. Click Actions > View Selected Record(s) > Preview Record(s) after Edit Action Applied. The View LHRs - Preview Record(s) after Edit Action Applied screen displays the selected records with the script change applied and includes any validation errors.
    3. Click View Current Record(s) to view the selected records in their current state. From the View LHRs - Current Record(s) screen, click Preview Record(s) after Edit Action Applied to return to the View LHRs - Preview Record(s) after Edit Action Applied screen.
    4. Once you have confirmed the script changes appear as expected, click Go Back.
    5. (Optional) Select a different set of records (up to 25) and repeat steps a through d.
  12. Click Actions > Edit > Selected Target Records.
  13. Click Apply in the Apply LHR Script to Selected Record(s) dialog window. The script running process is asynchronous. The time it takes to run varies depending on how many records you are editing. While the process is running, you can perform other actions in Record Manager outside of the LHR tab in the Record Work Lists screen.

    A confirmation message appears identifying how many records successfully updated or failed to update when the script has finished running.

Replace a string in an existing 876 field if the LHR has a matching barcode

Use this script to replace a string only if the specified barcode(s) is present in the same field.

  1. Navigate to Record Work Lists > LHR and then click the Record Work List ID for which you want to replace a string in an existing 876 field.
  2. From the LHR - Record Work List screen, select Base Script from the Edit Action drop-down list.
  3. Select Replace String in 876 Note Match Barcode from the Script Name drop-down list.
  4. Select a subfield from the Subfield drop-down list.
    • $x - Nonpublic Note (default)
    • $z - Public Note
  5. Select whether you want to Find Matching Text before Deleting Subfield. If Yes, complete the following:
    1. Select a matching option from the Matching Options drop-down list.
      1. Begins with
      2. Contains (default)
      3. Ends with
      4. Equals
    2. (Optional) For Capitalization, select Match Case to ensure that found text matches the letter case of the note text entered in the Find This Content form field.
    3. Enter the note text in the Find This Content form field.
  6. Scan or enter up to 25,000 barcodes in the Barcode Reference List text box.
     Note: Only items with matching barcodes will be changed by the script.
    • Barcodes must be separated with a space, comma, or line.
    • After you click out of the text box, the total number of barcodes entered and total number of duplicates removed are displayed above the text box.
    • Click Reset to remove the barcodes from the text box.
  7. Select the LHR record(s) for which you want to replace a string.
     Note:
    • To select all records on the current page of results, select the check box at the top of the table.
    • To select all records in the work list, click Actions > Edit > All Target Records.
  8. (Optional) Preview selected records with the script change.
    1. Select up to 25 records to which you want to apply the script change.
    2. Click Actions > View Selected Record(s) > Preview Record(s) after Edit Action Applied. The View LHRs - Preview Record(s) after Edit Action Applied screen displays the selected records with the script change applied and includes any validation errors.
    3. Click View Current Record(s) to view the selected records in their current state. From the View LHRs - Current Record(s) screen, click Preview Record(s) after Edit Action Applied to return to the View LHRs - Preview Record(s) after Edit Action Applied screen.
    4. Once you have confirmed the script changes appear as expected, click Go Back.
    5. (Optional) Select a different set of records (up to 25) and repeat steps a through d.
  9. Click Actions > Edit > Selected Target Records.
  10. Click Apply in the Apply LHR Script to Selected Record(s) dialog window. The script running process is asynchronous. The time it takes to run varies depending on how many records you are editing. While the process is running, you can perform other actions in Record Manager outside of the LHR tab in the Record Work Lists screen.

    A confirmation message appears identifying how many records successfully updated or failed to update when the script has finished running.

Replace a string in any LHR subfield

  1. Navigate to Record Work Lists > LHR and then click the Record Work List ID for which you want to replace a string.
  2. From the LHR - Record Work List screen, select Base Script from the Edit Action drop-down list.
  3. Select Replace String in Any LHR Subfield from the Script Name drop-down list.
  4. For Field, enter the local holdings record field for which you want to replace a string. For more information about MARC 21 fields, see OCLC-MARC local holdings format and standards.
  5. For Subfield, enter the subfield for which you want to replace a string. For more information about subfields for MARC 21 fields, see OCLC-MARC local holdings format and standards.
  6. Select a matching option from the Matching Options drop-down list.
    • Begins with
    • Contains (default)
    • Ends with
    • Equals
  7. (Optional) For Capitalization, select Match Case to ensure that found text matches the letter case of the string entered in the Find This Content form field.
  8. Enter the existing string text in the Find This Content form field.
  9. Enter the replacement string text in the Replace with This Content form field.
  10. Select the LHR record(s) for which you want to replace a string.
     Note:
    • To select all records on the current page of results, select the check box at the top of the table.
    • To select all records in the work list, click Actions > Edit > All Target Records.
  11. (Optional) Preview selected records with the script change.
    1. Select up to 25 records to which you want to apply the script change.
    2. Click Actions > View Selected Record(s) > Preview Record(s) after Edit Action Applied. The View LHRs - Preview Record(s) after Edit Action Applied screen displays the selected records with the script change applied and includes any validation errors.
    3. Click View Current Record(s) to view the selected records in their current state. From the View LHRs - Current Record(s) screen, click Preview Record(s) after Edit Action Applied to return to the View LHRs - Preview Record(s) after Edit Action Applied screen.
    4. Once you have confirmed the script changes appear as expected, click Go Back.
    5. (Optional) Select a different set of records (up to 25) and repeat steps a through d.
  12. Click Actions > Edit > Selected Target Records.
  13. Click Apply in the Apply LHR Script to Selected Record(s) dialog window. The script running process is asynchronous. The time it takes to run varies depending on how many records you are editing. While the process is running, you can perform other actions in Record Manager outside of the LHR tab in the Record Work Lists screen.

    A confirmation message appears identifying how many records successfully updated or failed to update when the script has finished running.

Find a failed record

If a record failed to update, the confirmation message provides a status.

To locate the failed record:

  1. Select Included Status(es) from the Filter by drop-down list.
  2. Select the status of the failed record from the drop-down list.
  3. Click Apply Filter(s) to locate the failed record.