SI.XQUERYLOOKUP

Overview

The SI.XQUERYLOOKUP function returns a field from the specified Sage Intacct REST API object, using key fields/values and an optional filter expression.

Syntax

=SI.XQUERYLOOKUP(
    ConnectionName,
    Object,
    Filter,
    FieldToReturn,
    KeyFields,
    KeyValue, 
    OtherKeyValue1,
    OtherKeyValue2,
    OtherKeyValue3,
    OtherKeyValue4
    ...
)

Arguments


Argument

Required/Optional

Description

ConnectionName

Optional

Provide one of the following values:

OR

Omit the argument to return results for all compatible connections with default aggregation settings.

Object

Required

A case-insensitive Sage Intacct REST API object name.

Filter

Optional

An optional filter to be used internally for SI.XQUERY.

Compatible with values returned by SI.XQUERYFILTER.

FieldToReturn

Required

The name of the field to be retrieved from Sage Intacct.

Reference a field from a related object using dot (.) syntax (relatedObjectName.fieldName).

Use SI.XOBJECTDEFINITION for a list of available field names.

KeyFields

Required

Specifies which field or fields uniquely identify the record to look up. Provide either:

  • A comma-separated list of field names — for example, ProjectID or CustomerID,LocationID. The combination must uniquely identify a single record within the results returned after the Filter argument is applied.

  • An Excel range reference containing the field names.

Provide the matching value for each key field in KeyValue and the OtherKeyValue arguments, in the same order.

KeyValue


The value that identifies the record, matching the first field listed in KeyFields

OtherKeyValue1


The value matching the second field listed in KeyFields.

Add one OtherKeyValue argument per additional key field, in the same order as KeyFields

...



OtherKeyValueN


The value matching the final field listed in KeyFields.

Examples

Simple lookup

=SI.XQUERYLOOKUP(
    "Sage",
    "construction-forecasting/wip-project",
    ,
    "estimatedCostAtCompletion",
    "id",
    "24"
)


Description:

Queries the Sage Intacct REST API construction-forecasting/wip-project object to retrieve its estimated cost at completion for project with ID 24

 

Result:

image-20250801-112820.png
=SI.XQUERYLOOKUP(,"accounts-payable/vendor",,"audit.createdbyuser.id","id","V00067")

Description:

Queries the Sage Intacct REST API accounts-payable/vendor object to retrieve the field id from a related object (audit.createdbyuser) based on the id field value (V00067) from the current object.

Result:

image-20260630-141617.png