BC.QUERYTABLE
Overview
Use the BC.QUERYTABLE function to return data that matches a filter expression directly from queryable Business Central tables.
Syntax
=BC.QUERYTABLE(
ConnectionName,
Table,
Filter,
Select,
IncludeHeader,
Settings,
TableOutputCell
)
Arguments
Argument | Required / Optional | Description |
|---|---|---|
| Optional | Provide one of the following values:
OR Omit the argument to return results for all compatible connections with default aggregation settings. |
| Required | Table name. Use the BC.EXPANDTABLERANGE function to retrieve a list of tables available for querying. |
| Optional | Filter expression. Use the BC.QUERYTABLEFILTER function to create ready-to-use filters. |
| Optional | Comma-separated list of table columns to be included in the resulting dataset. If omitted, all table columns will be returned. |
| Optional | Indicates whether column headers are included in the dataset. Accepted values: |
| Optional | Two-column array, containing one or more of the following keys:
|
| Optional | Specify the target cell address to return results in an Excel table. See the Table Mirroring article for details. |
Example
=BC.QUERYTABLE(,"Contact",,"First Name, Surname, Job Title, Company Name, Address, City",,,I6)
Description: Returns the contents of the table Contact found in the default connection. Columns First Name, Surname, Job Title, Company Name, Address, and City are selected. The results are output in an Excel table in cell I6.
