Skip to content

Main content

Form Source Key Ambiguity Gap Tool

Calculate form source key ambiguity gap from explicit caller-supplied inputs.

Loading tool…

Description

Group distinct source keys per target; count targets with multiple sources, distinct targets and distinctTargets-requiredTargetCount.

Administrative records depend on literal identifiers, numbering conventions, check alphabets and ownership mappings. A duplicate count, check symbol or one-hop route helps reconcile metadata without authenticating a document or establishing who has authority over it. A well-formed label can still refer to the wrong record.

Group distinct source keys per target; count targets with multiple sources, distinct targets and distinctTargets-requiredTargetCount.

When to use this tool

Use Form Source Key Ambiguity Gap when checking the stated administrative key, numbering, continuity or routing convention.

How to use the tool and how it works

  1. Enter sourceKeys, targetKeys, requiredTargetCount. Follow any array-alignment requirements below. 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 ambiguousTargets, distinctTargets, targetCountGap. Use the output convention below.

Require aligned source/target keys and nonnegative whole requiredTargetCount. Group distinct source keys per target; count targets with multiple sources, distinct targets and distinctTargets-requiredTargetCount.1

Input fieldMeaning and unitsAccepted input
sourceKeysSource KeysRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
targetKeysTarget KeysRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
requiredTargetCountRequired Target CountRequired. Safe integer; minimum 0.
Output fieldInterpretationReturned shape
ambiguousTargetsNumber of target keys associated with more than one distinct source key.Required. Safe integer.
distinctTargetsDistinct TargetsRequired. Safe integer.
targetCountGapTarget Count GapRequired. Safe integer.
json
{
  "input": {
    "sourceKeys": [
      "a",
      "b",
      "c"
    ],
    "targetKeys": [
      "X",
      "X",
      "Y"
    ],
    "requiredTargetCount": 3
  },
  "output": {
    "ambiguousTargets": 1,
    "distinctTargets": 2,
    "targetCountGap": -1
  }
}

Limitations and assumptions

  • Duplicate identical pairs do not create ambiguity; literal key groups do not determine whether a mapping is semantically correct.
  • 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.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use authoritative source records and the complete applicable document/process scheme for actual identity, routing or integrity decisions.

References

  1. Calculation and input contract: administrative-science/form-source-key-ambiguity-gap — tool.io

Similar or alternative tools

  • Form Repeated Field Count

    Return distinct literal field IDs and fieldIds.length-distinct count as repeated occurrences.

  • Form Field Reuse Count

    Optionally lowercase both field lists, deduplicate them and return shared fields in first-list encounter order and their count.