Skip to content

Main content

Formatting: Missing Value Display Token Map Tool

Choose an explicit missing-value display token only from a declared missing state, never inferring missingness from zero or empty text.

Loading tool…

Description

Accept state present or missing.

Numeric-looking text has both a value and a written form. Signs, decimal places, exponent markers and trailing zeros can carry display information that ordinary numeric conversion discards; formatting a token does not verify its meaning.

Accept state present or missing.

When to use this tool

Use Formatting: Missing Value Display Token Map when you need the specified literal representation or text-level numeric diagnostic.

How to use the tool and how it works

  1. Enter state, missingToken, presentText. 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 result. Expand result to inspect the returned fields.

Accept state present or missing. Return presentText or missingToken accordingly and a separate isMissing flag.1

Input fieldMeaning and unitsAccepted input
stateStateRequired. Text; one of "present", "missing". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
missingTokenMissing TokenRequired. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
presentTextPresent TextRequired. Text. Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultObject containing the calculated members; expand to inspect the fields below.Required. Object.
result.displayDisplayCalculated result member: string.
result.isMissingAuthoritative supplied-state flag even when both display strings happen to match.Calculated result member: boolean.
json
{
  "input": {
    "state": "missing",
    "missingToken": "NA",
    "presentText": "0"
  },
  "output": {
    "result": {
      "display": "NA",
      "isMissing": true
    }
  }
}

Limitations and assumptions

  • Missingness is supplied, not inferred from content. A present value may equal the missing token, so read isMissing rather than comparing display strings alone.
  • Outputs are nested inside result. 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

Use a locale-aware or destination-specific formatter when broader parsing and presentation rules are needed. Retain original text when lexical precision matters and validate numeric meaning separately.

References

  1. Calculation and input contract: format/missing-value-display-token-map — tool.io

Similar or alternative tools