sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function exclude

exclude( filter, input?, config?): Filter

Creates a filter that excludes items matching the given filter from all items or from items matching the optional input filter.

Parameters

ParameterTypeDescription
filterFilterFilter to exclude
input?FilterInput filter to exclude from, on the same attribute. If not provided, the filter excludes from all items.
config?BaseFilterConfigOptional configuration for the filter

Returns

Filter

A filter representing an exclusion of the given filter from all attribute members or from the optional input filter

Example

Filter for items where the country name does not contain the letter 'A' from the Sample ECommerce data model.

filterFactory.exclude(filterFactory.contains(DM.Country.Country, 'A'))

Filter for items where the country name starts with the letter 'B' but does not contain the letter 'A' from the Sample ECommerce data model. This filter will match countries like 'Belgium', but will not match countries like 'Bermuda'.

filterFactory.exclude(
  filterFactory.contains(DM.Country.Country, 'A'),
  filterFactory.startsWith(DM.Country.Country, 'B')
)
Last Updated: