Interface: FilterSimplification
An interface for components that support filter simplification operations. Components implementing this interface can retrieve fields, interaction details, and filter field values.
| Methods |
|---|
getFields(
dataSources?):Promise<Map<string,Field[]>>
Returns a map of fields associated with the component.
• dataSources?: DataSource[]
A list of data sources to retrieve the fields from. This isn’t required for visualizations and metrics. If omitted for dashboards, fields for all available data sources will be returned.
Promise<Map<string, Field[]>>
- A promise that resolves to a map where each key is a string data source API name
and value is an array of Field objects.
getFilterFieldValues(
fieldApiName,fieldObjectName?,searchTerm?):Promise<any>
Retrieves the values for a specified field.
• fieldApiName: string
Required. The API name of the field to retrieve the values for.
• fieldObjectName?: string
The object name of the field.
The fieldObjectName parameter is only required if the specified field has an associated object name.
User can know whether field has an associated object name or not in the response of getFields().
• searchTerm?: string
Optional. A search term to filter the field values.
Promise<any>
A promise that resolves with the field values. The exact structure depends on the event handler.
getInteractionDetails():
Promise<InteractionDetails>
Returns a comprehensive map containing all available data sources, fields, and filter fields for the component. This method provides a complete overview of the component.
Note: The dataSources array is only available for DashboardComponent
Promise<InteractionDetails>
A promise that resolves to an InteractionDetails object containing:
dataSources: Array of available data sourcesfields: Map where each key is a string data source API name and value is an array of Field objectsfilterFields: Map where each key is a string data source API name and value is an array of filterable Field objects