{
  "category": "Lookup and reference functions",
  "display_name": "FIELDVALUE",
  "entry_kind": "built_in_function",
  "eval_api": {
    "method": "POST",
    "url": "https://handbook.dnacalc.com/api/eval"
  },
  "function_id": "FUNC.FIELDVALUE",
  "implementation_state": {
    "answer_bank": null,
    "detail": "Recorded: 25 workbook cells.",
    "dnacalc_commit": "9e1884369a678158dd82d3d74188daf986995e87",
    "in_catalogue": true,
    "state": "matches",
    "state_label": "Matches every recorded Excel answer",
    "summary": "Matches all 25 recorded answers",
    "workbook_corpus": {
      "cells": 25,
      "matched": 25
    }
  },
  "implementations": [
    {
      "commit": "9e1884369a678158dd82d3d74188daf986995e87",
      "flavour": "excel-compatibility-candidate",
      "language": "Rust",
      "name": "CalcFunc",
      "own_code": [
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/host_facts.rs#L457-L457",
        "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/host_facts.rs#L288-L299"
      ],
      "repository": "https://github.com/DnaCalc/DnaCalc",
      "shared_code": [],
      "source": "https://github.com/DnaCalc/DnaCalc/blob/9e1884369a678158dd82d3d74188daf986995e87/crates/calc-func/src/catalogue/host_facts.rs#L457-L457",
      "state": "matches",
      "suite": null,
      "summary": "Matches all 25 recorded answers"
    }
  ],
  "json_url": "https://handbook.dnacalc.com/api/functions/FUNC.FIELDVALUE.json",
  "name": "FIELDVALUE",
  "notes": [],
  "schema": "efh.function-reference/v1",
  "section_order": [
    "what-it-does",
    "try-it",
    "quirks",
    "how-to-implement",
    "version-differences",
    "alternatives"
  ],
  "sections": {
    "alternatives": "\n- The dot form, `=A1.Price`.\n- `STOCKHISTORY` for past prices.\n\n\n",
    "how-to-implement": "\nOur Rust implements the function's behaviour on the values DNA Calc holds. No value it holds is a linked data type, because\na workbook cell with one is not loaded. So it answers `#FIELD!` or the argument's error, and the fields themselves are out\nof reach until linked data types load.\n\n\n",
    "quirks": "\n- Microsoft's page says `#FIELD!` appears for a field that does not exist, a cell without the data type, or a record lacking\n  that field.\n- Recorded in Excel 16.0 build 20430: `FIELDVALUE` of a number, text, logical, error, blank cell or LAMBDA gives `#FIELD!`\n  whatever the field name. An error given as the field name is the result.\n- `IFERROR` around the call hides blanks, as in Microsoft's own example.\n\n\n",
    "sources": "\n- [FIELDVALUE function](https://support.microsoft.com/en-us/office/fieldvalue-function-4a579c45-7326-4168-b556-df8b5685175b)\n- [How to write formulas that reference data types](https://support.microsoft.com/en-US/Excel/how-to-write-formulas-that-reference-data-types)\n\n",
    "version-differences": "\nAnswers recorded here come from Excel 16.0 build 20430. No comparison between builds exists.\n\n\n",
    "what-it-does": "\n`FIELDVALUE` reads one named field from a cell holding a linked data type, such as a stock or a geography.\n\n`FIELDVALUE(value, field_name)`\n\n- **`value`** is the cell with the data type.\n- **`field_name`** is the field, as text or from a cell.\n\n`=FIELDVALUE(A1,\"Price\")` reads the same field as the dot form `=A1.Price`. The function form suits formulas where the\nfield name comes from a cell.\n\n\n"
  },
  "signature": {
    "display": "FIELDVALUE(value, field_name)",
    "parameters": [
      {
        "description": null,
        "name": "value",
        "optional": false,
        "repeats": false
      },
      {
        "description": null,
        "name": "field_name",
        "optional": false,
        "repeats": false
      }
    ],
    "trailing_repeats": false
  },
  "sources": {
    "metadata": {
      "admission": {
        "label": "implemented",
        "reason": null
      },
      "arity": {
        "max": 2,
        "min": 2
      },
      "category": "Lookup and reference functions",
      "classification": {},
      "descriptions": {
        "long": null,
        "short": "A named field of a linked data type",
        "short_source": "dna-calc-own"
      },
      "docs": {
        "english_description": null,
        "microsoft_url": "https://support.microsoft.com/en-us/office/fieldvalue-function-4a579c45-7326-4168-b556-df8b5685175b"
      },
      "entry_kind": "built_in_function",
      "localized_family_names": null,
      "localized_names": [],
      "signature": {
        "display": "FIELDVALUE(value, field_name)",
        "parameters": [
          {
            "description": null,
            "name": "value",
            "optional": false,
            "repeats": false
          },
          {
            "description": null,
            "name": "field_name",
            "optional": false,
            "repeats": false
          }
        ],
        "trailing_repeats": false
      },
      "surface_name": "FIELDVALUE",
      "version_marker": null,
      "xlcall": null
    },
    "microsoft": "https://support.microsoft.com/en-us/office/fieldvalue-function-4a579c45-7326-4168-b556-df8b5685175b"
  },
  "try_it": {
    "formula": "=FIELDVALUE(1,\"Name\")",
    "preview_reason": "The input is a number rather than a linked data type, so the preview returns #FIELD!.",
    "preview_status": "worksheet-error"
  },
  "url": "https://handbook.dnacalc.com/functions/FIELDVALUE.html",
  "variants": [],
  "versions": []
}