✅ You are viewing documentation for the latest version of Compose SDK.
Version:
# Function startsWith
startsWith(
attribute
,value
,config
?):Filter
Creates a filter to isolate attribute values that start with a specified string.
Matching is case insensitive.
You can optionally use wildcard characters for pattern matching, as described in the
like()
function.
# Parameters
Parameter | Type | Description |
---|---|---|
attribute | Attribute | Text attribute to filter on |
value | string | Value to filter by |
config ? | BaseFilterConfig | Optional configuration for the filter |
# Returns
A filter instance
# Example
Filter for countries in the Sample ECommerce data model where the country name starts with 'United'. This filter matches countries like 'United States' and 'United Kingdom'.
filterFactory.startsWith(DM.Country.Country, 'United')