Skip to content

Main content

Catalogue Field Repeat Count Tool

Calculate catalogue field repeat count from explicit caller-supplied inputs.

Loading tool…

Description

Count exact requestedTag matches in tags and return max(0, occurrences - 1) as repeatsBeyondFirst.

Inclusive labels, repeated records, and serial restarts describe different counting bases. A numeric span is not automatically the count of existing physical or bibliographic items.

Count exact requestedTag matches in tags and return max(0, occurrences - 1) as repeatsBeyondFirst.

When to use this tool

Use Catalogue Field Repeat Count when you need a catalog count under a declared endpoint or restart convention.

How to use the tool and how it works

  1. Enter tags, requestedTag. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read occurrences, repeatsBeyondFirst. Use the output convention below.

Count exact requestedTag matches in tags and return max(0, occurrences - 1) as repeatsBeyondFirst.1

Input fieldMeaning and unitsAccepted input
tagsTagsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
requestedTagRequested TagRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
occurrencesOccurrencesRequired. Safe integer.
repeatsBeyondFirstRepeats Beyond FirstRequired. Safe integer.
json
{
  "input": {
    "tags": [
      "650",
      "245",
      "650"
    ],
    "requestedTag": "650"
  },
  "output": {
    "occurrences": 2,
    "repeatsBeyondFirst": 1
  }
}

Limitations and assumptions

  • No tag vocabulary, field order, or repeatability rule is checked.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Compare the computed count with the original serial or item record, including missing and unnumbered material.

References

  1. Calculation and input contract: library-science/catalogue-field-repeat-count — tool.io

Similar or alternative tools