Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CategoricalFilter

A Categorical Filter

Hierarchy

Index

Properties

appliedValues

appliedValues: Array<DataValue>
returns

A list of values applied to this categorical filter. Notice that if this is a dependent filter, the current relavent values can be fetched by calling getDomainAsync(tableau.FilterDomainType.Relevant).

fieldId

fieldId: string
returns

The id of the field being filtered.

fieldName

fieldName: string
returns

The name of the field being filtered. Note that this is the caption as shown in the UI, and not the actual database field name.

filterType

filterType: FilterType
returns

The type of the filter.

Optional isAllSelected

isAllSelected: undefined | false | true
returns

True if all the values are selected for this filter. When 'All' is selected, appliedValues returns an empty list.

This field is available in Tableau 2019.2 or later

isExcludeMode

isExcludeMode: boolean
returns

True if this filter is an exclude filter, false if an include filter.

worksheetName

worksheetName: string
returns

The parent worksheet.

Methods

getAppliedWorksheetsAsync

  • getAppliedWorksheetsAsync(): Promise<Array<string>>
  • Returns Promise<Array<string>>

    the list of worksheet names that have the filter applied.

getDomainAsync

  • Parameters

    Returns Promise<CategoricalDomain>

    a promise containing the categorical domain for the filter. Note if a filter contains multiple fields (such as a filter action with multiple fields), the values array in the returned CategoricalDomain (CategoricalDomain.values) will be empty. If there are multiple fields in the filter, the results need to be represented by a table, which is not currently supported.

getFieldAsync

  • getFieldAsync(): Promise<Field>
  • Returns Promise<Field>

    a promise containing the field for the filter.

setAppliedWorksheetsAsync

  • setAppliedWorksheetsAsync(applyToWorksheets: Array<string>): Promise<Array<string>>
  • Applies the filter to the specified list of worksheets. If the worksheet(s) do not exist or do not contain the field in their data sources, an exception is thrown.

    Parameters

    • applyToWorksheets: Array<string>

      list of worksheets to apply the filter on

    Returns Promise<Array<string>>

    the list of worksheet names that have the filter applied