BC.QUERYFILTER
Overview
The BC.QUERYFILTER function returns a string that can be used as input for the Filter argument in the BC.QUERY function.
Syntax
=BC.QUERYFILTER(
ConnectionName,
Object,
CaseInsensitive,
Api,
Column1,
Criteria1,
…,
ColumnN,
CriteriaN
)`
Arguments
Argument | Required/Optional | Description |
---|---|---|
| Required | The name of the connection, as specified in the Connection Manager |
| Required | Business Central object name. For instance, Please use BC.EXPANDOBJECTRANGE to explore available objects. |
| Optional | Produce a filter insensitive to the case of text values. Possible values: |
| Optional | API to be referenced for Object names.
|
| Required | Name of the object field you wish to filter. Use BC.OBJECTDEFINITION to explore available fields. |
| Required | A criterion or set of criteria that you want your filtered results to meet. Criteria can be one of the following:
The argument can be a single value, an array of values, or a range of cells. |
… | ||
| Optional | Another name of an object field you wish to filter |
| Optional | Another criterion or set of criteria that you want your filtered results to meet |
Example
You need a filter that returns all debit entries over $4000 posted after 1 Jan 2024.
First, find the object name. You can use the BC.EXPANDOBJECTRANGE function to find the name of the WIP period object. It is generalLedgerEntries
.
Then, you can use the BC.OBJECTDEFINITION function to retrieve all properties available for the object. In this case, you are interested in the debitAmount
and postingDate
fields.
Providing this information, you can arrive at the following formula:
=BC.QUERYFILTER(
"BC",
"generalLedgerEntries",
,
,
"debitAmount",
">= 4000",
"postingDate",
">= 2024-01-01"
)
When executed, it returns the following filter, ready to use with the BC.QUERY function:

Below, you can see the filter used with the BC.QUERY function:
