WHERE ER function

The WHERE function returns the specified list as a Record list value after it has been filtered according to the specified condition.

Syntax

WHERE (list, condition)

Arguments

list: Record list

The valid path of a data source of the Record list data type.

condition: Boolean

A valid conditional expression that is used to filter records of the specified list.

Return values

Record list

The resulting list of records.

Usage notes

This function differs from the FILTER function, because the specified condition is applied to any Electronic reporting (ER) data source of the Record list type that is present in memory.

If the arguments that are configured for this function (list and condition) allow this request to be translated to the direct SQL call, a warning message is thrown at design time. This message informs the user that performance might be improved if the FILTER function is used instead of WHERE.

Example 1

If Vendor is configured as an ER data source that refers to the VendTable table, the expression WHERE (Vendors, Vendors.VendGroup = "40") returns a list of only vendors that belong to vendor group 40.

Example 2

If you enter data source DS of the Calculated field type, and it contains the expression SPLIT ("A|B|C", "|"), the expression WHERE( DS, DS.Value = "B") returns a list of only one record that contains the text "B" in the Value field.

Additional resources

List functions