SI.XQUERY
Applies to
Velixo NX 2025.4 or higher
Sage Intacct
Introduction
If you want to get data from your ERP, you can use SI.XQUERY function, which is a powerful tool for querying the most recently developed Sage objects that are unavailable for querying via SI.QUERY.
The function uses the familiar syntax of SI.QUERY with slight changes.
Syntax
=SI.XQUERY(ConnectionName, Object, Filter, Select, IncludeHeader, Settings, OutputColumn1, OutputColumn2, ... OutputColumnN)
Parameters
Parameter | Required/Optional | Description |
---|---|---|
ConnectionName | Required | The name of the connection, as specified in the Connection Manager |
Object | Required | Sage Intacct REST object name. For instance, Please use SI.XEXPANDOBJECTRANGE to explore available objects. |
Filter | Optional | SQL-like query based on the fields of the object. The following operators are supported: The Use backslashes before characters other than letters, numbers, and whitespace. For example, Joins are not supported. Use the SI.XOBJECTDEFINITION function to get the list of the object fields. You can also use the SI.XQUERYFILTER function to build filters for SI.XQUERY. |
Select | Optional | Comma-separated list of columns to be included in the resulting dataset. Use the SI.XOBJECTDEFINITION function to get the list of the object fields. If you omit this parameter, all the columns from the object will be returned. |
IncludeHeader | Optional | If |
Settings | Optional | The list of settings (key-value pairs) to specify advanced query settings. You can pass one or more keys with their values. Each key controls a different setting:
Example:
CODE
|
OutputColumn1 | Optional | The address of the header of the first column (top left corner of the Excel table) of the result set. If the parameter is omitted, the result is returned as an array. |
OutputColumn2 | Optional | The address of the header of the second column of the result set. It must be on the same row as |
... | ||
OutputColumnN | Optional | The address of the header of the Nth column of the result set. It must be on the same row as |
Output
The function returns a spill range (if OutputColumns are omitted) or an Excel table (if OutputColumns are specified) with the columns specified in the Select parameter or all columns if the Select parameter is omitted.
Please read about table mirroring to leverage Excel tables produced by query functions more efficiently.
Example
Say you want to get all posted WIP periods ending in 2025 Q1.
First of all, you need to find the object name.
Use the SI.XEXPANDOBJECTRANGE function to find the name of the WIP period object. It is construction-forecasting/wip-period.
If, for some reason, you have doubts regarding what object to use, please refer to the Sage Intacct documentation.
Then, you might want to look at the object definition to decide what columns you want to see in the query result. Use the SI.XOBJECTDEFINITION function to get all the information.

SI.XOBJECTDEFINITION output for construction-forecasting/wip-period
fiscalYear, id, and isHistoricalImport are the values you can use in the Select, Filter, and Sort parameters, as well as other values in the ID column.
You may select key, periodName, isHistoricalImport, notes, state, and periodEndDate.
The last two will also be used for filtering. The filter will be the following:
periodEndDate >= '2025-01-01' and periodEndDate <= '2025-03-31' and state = 'posted'
Now, the entire query will look this way:
=SI.XQUERY("Sage","construction-forecasting/wip-period","periodEndDate >= '2025-01-01' and periodEndDate <= '2025-03-31' and state = 'posted'", "key, periodName, isHistoricalImport, notes, state, periodEndDate")
Finally, you can sort your query to make it prettier:
HSTACK({"Sort";"Limit"}, {"periodEndDate:DESC";3})
=SI.XQUERY("Sage","construction-forecasting/wip-period","periodEndDate >= '2025-01-01' and periodEndDate <= '2025-03-31' and state = 'posted'", "key, periodName, isHistoricalImport, notes, state, periodEndDate",,HSTACK({"Sort";"Limit"}, {"periodEndDate:DESC";3}))