---
title: "pivot.fieldList: Field List — Sheet kit command — Kition"
description: "Answers a pivot table's fields and layout (same as pivot.fields)."
canonical: "https://developer.kition.ai/docs/kits/sheet/commands/pivot.fieldList"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/sheet/commands/pivot.fieldList](https://developer.kition.ai/docs/kits/sheet/commands/pivot.fieldList)

# pivot.fieldList

**Field List.** Answers a pivot table's fields and layout (same as pivot.fields).

- Kit: Sheet 0.1.0 (.xlsx (and opens .xlsm, .xls, .xltx, .csv, .ods, .xlsb)); reference: [Sheet kit commands](https://developer.kition.ai/docs/kits/sheet.md)
- Changes the document: no

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `pivot` | `string \| integer` | no | default: the pivot table at the active cell |

## Call through sheet_run

```text
sheet_run {
  "path": "<file>.xlsx",
  "steps": [{ "command": "pivot.fieldList" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `pivot`. sheet_run answers the step’s result in `completed[i].result`.

## Result

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `anchor` | `string` | no |  |
| `columns` | `any[]` | no |  |
| `fields` | `object[]` | no |  |
| `filters` | `any[]` | no |  |
| `grandTotalsCols` | `boolean` | no |  |
| `grandTotalsRows` | `boolean` | no |  |
| `id` | `number` | no |  |
| `layout` | `string` | no |  |
| `name` | `string` | no |  |
| `range` | `string` | no |  |
| `records` | `number` | no |  |
| `rows` | `object[]` | no |  |
| `sheet` | `string` | no |  |
| `showHeaders` | `boolean` | no |  |
| `source` | `string` | no |  |
| `style` | `string` | no |  |
| `subtotals` | `string` | no |  |
| `values` | `object[]` | no |  |

```json
{
  "additionalProperties": true,
  "properties": {
    "anchor": {
      "type": "string"
    },
    "columns": {
      "type": "array"
    },
    "fields": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "areas": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "date": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "numeric": {
            "type": "boolean"
          },
          "samples": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "filters": {
      "type": "array"
    },
    "grandTotalsCols": {
      "type": "boolean"
    },
    "grandTotalsRows": {
      "type": "boolean"
    },
    "id": {
      "type": "number"
    },
    "layout": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "range": {
      "type": "string"
    },
    "records": {
      "type": "number"
    },
    "rows": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "collapsed": {
            "type": "array"
          },
          "field": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "sort": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "sheet": {
      "type": "string"
    },
    "showHeaders": {
      "type": "boolean"
    },
    "source": {
      "type": "string"
    },
    "style": {
      "type": "string"
    },
    "subtotals": {
      "type": "string"
    },
    "values": {
      "items": {
        "additionalProperties": true,
        "properties": {
          "field": {
            "type": "string"
          },
          "func": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "numberFormat": {},
          "showAs": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    }
  },
  "type": "object"
}
```

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "pivot": {
      "description": "default: the pivot table at the active cell",
      "oneOf": [
        {
          "description": "a pivot table name",
          "type": "string"
        },
        {
          "description": "a pivot table id",
          "type": "integer"
        }
      ]
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/sheet-darwin-arm64@0.1.0 and the kit itself (sheet_commands through @kition/cli@0.1.1, built from KitionAI/kition-sheet@82f13b2).
