a!facet_17r1 Function

This page contains information related to an old version of the a!facet() Function.

Old versions do not appear in category lists; only the newest versions are listed.

To take advantage of the latest features and improvements, we always recommend you use the latest versions of functions whenever possible. See the latest version's page for information about what's been changed.

Creates a user filter category for record list.

This function creates a Facet type object, and is used within a Record Type Object

Options for the user filter are created with the a!facetOption() function. The most popular use of a!facet() is to generate filter options instead of manually writing them. See the Expressible User Filters page for common uses.

Syntax

a!facet( name, options, defaultOption, isVisible )

  • name (Text): The name of the user filter that displays to end users.
  • options (FacetOption Array): The options that users can select from for a given user filter.
  • defaultOption (Text): Determines which, if any, filter option is applied when a record list first loads.
  • isVisible (Boolean): Determines whether the filter is visible to the user at runtime. Default is true.

Returns

Facet

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
=a!facet(
  name: "Status",
  options: {
    a!facetOption(
      id: 2,
      name: "Active",
      filter: a!queryFilter(
        field: "status",
        operator: "=",
        value: "active"
      )
    ),
    a!facetOption(
      id: 3,
      name: "Inactive",
      filter: a!queryFilter(
        field: "status",
        operator: "=",
        value: "Inactive"
      )
    )
  },
  defaultOption: "Active",
  isVisible: true
)
FEEDBACK