a!queryFilter() Function

Function

a!queryFilter( field, operator, value, applyWhen )

Creates a value of type QueryFilter for use with a!pickerFieldRecords when defining filter options for expression-backed records, filtering a a!queryRecordType() or a!queryEntity() function call before any grouping or aggregation is computed, or using the a!recordData() function to define additional filters when referencing a set of records from a record type.

See also: a!queryRecordType(), a!recordData(), a!query(), a!recordFilterListOption(), queryfilter

Parameters

Keyword Type Description

field

Any Type

The name of the field to be filtered. When filtering record data, use the recordType! domain to reference a record field or related record field. For example, recordType!Case.fields.caseName.

operator

Text

Filter operator to apply to the data. Valid values: "=", "<>", ">", ">=", "<", "<=", "between", "in", "not in", "is null", "not null", "starts with", "not starts with", "ends with", "not ends with", "includes", "not includes".

value

Any Type

The value to compare to the given field using the given operator. Can be entered as an expression. Optional if the operator value is "is null" or "not null". Filter is ignored if value is empty or null and operator is neither "is null" or "not null".

applyWhen

Boolean

Determines whether the filter is applied on the query. When set to false, the filter is not evaluated. Default: true.

Returns

QueryFilter

Usage considerations

Using the operator parameter

  • If the operator value is between, the value must be a list of only two elements with the lower bound as the first element and the upper bound as the second.

Filter record data

  • When filtering record data, you must reference fields from the record type specified in the recordType parameter. Use a record type field reference to reference the field you want to filter by. For example, recordType!Employee.fields.department.

Examples

1
2
3
4
5
	=a!queryFilter(
	  field: recordType!Case.fields.status,
	  operator: "=",
	  value: "active"
	)

See Query Recipes for examples of filtering data from a data store entity.

Open in Github Built: Thu, Sep 16, 2021 (04:12:04 PM)

On This Page

FEEDBACK