Sets the field's filters of the kinds given and leaves its others, as one step that can be undone.
Optionaloptions: ITransaction.OperationOptionsA field takes one label-or-date filter and one value-or-top filter, as Excel's does; one given replaces the field's filter of its kind. Items hidden by hand stand beside them.
label tests each item's caption as its cell shows it; given no selector, it takes the
Display selector.date tests each item's date.value tests each item's total of a data field within each item of the fields outside it;
a top N ranks the items under one outer item together.manual names the items shown, every item for null; on a page field, its selection.A condition no Excel pivot filter type spells is kept and laid out, and is left out of an xlsx file with a warning.
Clears every filter of the field and shows every item, as one step that can be undone; a page field shows all its items again.
Optionaloptions: ITransaction.OperationOptionsClears the field's filter of type, as one step that can be undone; manual shows every
item.
Optionaloptions: ITransaction.OperationOptionsReturns the axis the field is on, or null when it is on none.
Returns whether the field leaves a blank line after each of its items.
Returns the item a page field shows, or null when it shows every item or more than one.
Returns what the field's items are: numbers, dates, text (logicals and errors among it), a
mix of those, or blank when it holds nothing. A calculated field is numbers.
The rule IPivotTable.addDataField follows for a value's function: number sums, any
other counts. A field list places a field by it, numbers in the values and the rest on the rows.
Returns the field's filters: its label or date filter, its value or top filter, and the items it shows when some are hidden by hand. Empty when the field is not filtered.
Returns how the field's items are laid out.
Returns the item with a caption, matched without regard to case, or null when there is none.
Returns the field's items in the table's order; empty for a field the table lists none for.
Returns the field's caption: its own name in the table, else its cache field's.
Returns the format code of the field's item labels: its own, else its source column's, else
General; empty for a field holding anything but numbers and dates, which takes none.
Returns the table the field belongs to.
Returns the field's place on its axis, counted from 1, the values counting where they sit among
the fields; null off the table.
Returns whether the field repeats its item's label on each line the item spans.
Returns whether the field shows every item, those with no data included.
Returns how the field's items are sorted, or null when they are in the order listed.
Returns the subtotals the field shows, in the order they show: automatic, or its functions;
empty for none.
Returns whether the field's subtotals show on its items' first line rather than after them.
Returns whether the field is filtered: by a filter of type, or by any when omitted.
Optionaltype: FilterTypePuts the field on an axis, or takes it off the table for null, as one step that can be undone.
Where it goes; null is nothing for a field already off the table.
Optionalposition: number
Its place on the axis, counted from 1, the values counting where they sit among
the fields; absent, after the last. Absent is nothing for a field already on axis.
Optionaloptions: ITransaction.OperationOptionsThe table is laid out again from its cache. Where a value is in the way it shows #SPILL!, and
a page field with no room above moves the table down, where it stays once the field has gone.
What the field holds goes with it, off the table and back too: hidden items, filters, sort and names. On the page axis it loses its filters, and items hidden there are a multiple selection; off the page it loses its pick. A field off the table filters nothing. Taking it off also drops the formats on its labels and on the values under them, for good; a move between axes keeps them. A sort by one line of the other axis ends when that line's fields are no longer that axis's outermost.
A field stays with its data fields either way: one source can be on an axis and summarized at once. To remove a value, delete its IDataField.
Sets whether the field leaves a blank line after each of its items, as one step that can be undone.
Optionaloptions: ITransaction.OperationOptionsShows one item of a page field, or every item for null, as one step that can be undone.
Optionaloptions: ITransaction.OperationOptionsThe field selects a single item: any items hidden by setVisibleItems are shown again.
Shows or hides the details of every item of the field, as one step that can be undone.
Optionaloptions: ITransaction.OperationOptionsLays out the field's items in a form, as one step that can be undone.
Optionaloptions: ITransaction.OperationOptionsFields of different forms share an axis: a compact field shares its label column with the field inside it. IPivotTable.setForm sets every field at once.
Renames the field in the table, as one step that can be undone; its source field's name restores the original.
Optionaloptions: ITransaction.OperationOptionsSets the number format of the field's item labels, as one step that can be undone.
A format code, or a built-in format's id.
Optionaloptions: ITransaction.OperationOptionsGETPIVOTDATA still finds items by their values, and by the text they show. It does not reach a value that
summarizes the field: see IDataField.setNumberFormat.
Moves the field along its axis, as one step that can be undone.
Its place, counted from 1 as getPosition counts.
Optionaloptions: ITransaction.OperationOptionsSets whether the field repeats its item's label on each line the item spans, as one step that can be undone.
Optionaloptions: ITransaction.OperationOptionsShows every item of the field, those with no data included, or only those with data, as one step that can be undone.
Optionaloptions: ITransaction.OperationOptionsSets the subtotals the field shows, as one step that can be undone.
Empty for none.
Optionaloptions: ITransaction.OperationOptionsThe automatic subtotal takes the place of any function asked for with it, and functions show in one order whatever the order asked. One function alone sits where the automatic subtotal does; two or more always show on lines after the items. With none, an item's own line holds no value in compact and outline forms. The setting holds for a field off the table, and shows when it is an outer field of its axis.
Sets whether the field's subtotals show on its items' first line rather than after them, as one step that can be undone.
Optionaloptions: ITransaction.OperationOptionsShows only the named items, or every item for null, as one step that can be undone.
Optionaloptions: ITransaction.OperationOptionsSorts the field's items by their labels, as one step that can be undone: numbers, then text without regard to case, logicals, errors, and blanks last; descending is the exact reverse. A sort by value is replaced.
Optionaloptions: ITransaction.OperationOptionsSorts the field's items under each outer item by a data field's value, as one step that can be undone: their totals, or their values in one line of the other axis.
The data field, by name.
Optionalscope: readonly string[] | null
The line of the other axis to read: its items' names, outermost field first.
Fewer names than the axis has fields name a subtotal line (['2023'] over Year and Quarter
is the 2023 total). Absent or empty, the grand total.
Optionaloptions: ITransaction.OperationOptions
A field of a pivot table: a field of its cache, as the table uses it.
Remarks
Changing what a field shows - collapsing items, hiding them, choosing a page item - changes the table's definition and lays the table out again from its cache, as one step that can be undone. The source is not read again. A table that grows over cells that hold anything shows
#SPILL!, as a refresh does.A field is a view of the table: it reads the table as it is now.