Back to Functions
XO.LACCOUNT
Lookup a property of a GL account by account code. Returns name, type, class, status, description, or tax type.
Syntax
=XO.LACCOUNT(org_id, account_code, property)
Parameters
| Parameter | Required | Description |
|---|---|---|
| org_id | Yes | Organization ID from XO.ORG() |
| account_code | Yes | GL account code (e.g., "4000") |
| property | Yes | Property to return (0-5, see table below) |
Property Options
| Code | Property | Description |
|---|---|---|
| 0 | name | Account name (e.g., "Sales - General") |
| 1 | type | Account type (BANK, CURRENT, FIXED, etc.) |
| 2 | class | Account class (ASSET, LIABILITY, REVENUE, EXPENSE, EQUITY) |
| 3 | status | Account status (ACTIVE, ARCHIVED) |
| 4 | description | Account description |
| 5 | taxType | Tax type code |
Examples
Get account name:
=XO.LACCOUNT(A2, "4000", 0)Get account class:
=XO.LACCOUNT($A$2, "200", 2)Get account type:
=XO.LACCOUNT(A2, "800", 1)