ACU.QUERY
Introduction
To get data from an ERP instance into your workbook, use the ACU.QUERY function, which returns the contents of a specified ERP object (as either an Excel array or - optionally - as an Excel table).
Syntax
=ACU.QUERY(ConnectionName, Object, Filter, Select, IncludeHeader, Settings, TableOutputCell)
Arguments
Argument | Required/Optional | Description |
---|---|---|
| Required | The name of the connection, as specified in the Connection Manager |
| Required | Object name. For instance, You can use ACU.EXPANDOBJECTRANGE to explore available objects. |
| Optional | OData4 query based on the fields in the object. OData4 operators are supported, including: |
| Optional | Comma-separated list of columns to be included in the resulting dataset. Use the ACU.OBJECTDEFINITION function to get the list of the object fields. If you omit this argument, all the columns from the object will be returned. |
| Optional | If If the Default value: |
| Optional | You can either enter a number (e.g.
|
| Optional | If the argument is specified, the function output is represented as an Excel table, and the first column in the If the argument is omitted, the result is returned as an array. |
Output
The function returns a spill range (if OutputTableAddres
is omitted) or an Excel table (if OutputTableAddress
is specified) with the columns specified in the Select
argument or with all columns if the Select
argument is omitted.
Excel Online
Loading large datasets with the GI() function is not performant in Excel Online due to the limitations of the Excel platform in the browser. If your dataset contains more than approximately 100,000 records, we strongly recommend using a desktop version of Excel 365 for Windows or Mac OS.
Examples
First 10 records
ACU.QUERY("Acumatica","GLBatch",,,,10)
Description: Returns the top 10 records returned by the GLBatch object.
Result:

Filter
=ACU.QUERY("Acumatica","Contact","CLASSID eq 'LEADBUS'","CONTACTID,FULLNAME,EMAIL")
Description:
Returns the CONTACTID, FULLNAME and EMAIL fields from the CONTACT object where the CLASSID field is set to LEADBUS
:
Result:

Send output to an Excel table
Other examples of creating Excel tables can be found in Table Mirroring.
=ACU.QUERY("Acumatica","PMLaborCostRate",,"RECORDID,EMPLOYEEID,RATE,CURYID,REGULARHOURS",,,A2)
Description:
Instead of displaying the results of the query starting in the cell containing the ACU.QUERY function, the function displays the specified fields from the Project object in an Excel data table with its origin in the cell specified by the OutputTableAddress
argument (cell A2).
Result:
