a!facetOption() Function

Creates a filter option for the a!facet() function.

This function, when used within the options parameter in the a!facet() function, creates a user filter option. See the Expressible User Filters page for more information and common uses.

Syntax

a!facetOption( id, name, filter, dataCount )

  • id (Integer): The unique identifier for the filter option. This must be unique across other filter options within the same user filter.
  • name (Text): The name of the filter option that is displayed to users.
  • filter (QueryFilter): The QueryFilter value that will be sent by the framework when this filter option is selected.
  • dataCount (Integer): An optional value that defines how many items in the data set will be selected if this filter option is selected.

Returns

FacetOption

Example

1
2
3
4
5
6
7
8
9
=a!facetOption(
  id: 2,
  name: "Active",
  filter: a!queryFilter(
    field: "status",
    operator: "=",
    value: "active"
  )
)
FEEDBACK