# ExpressionContext

Canonical page: https://www.adaptabletools.com/docs/reference/expressioncontext

The context an Adaptable custom expression function handler is documented
against: aql&#39;s host-agnostic accessors plus the Adaptable extras users
legitimately need (`adaptableApi`, `adaptableContext`, …).

Evaluator plumbing (`functions`) and host internals (`filterFn`,
`namedQueryCallStack`, pivot / override state) are deliberately absent —
see `AdaptableInternalExpressionContext`. `argNodes` is the one piece of
evaluator provenance kept public: it is the documented mechanism for a
custom/extended handler to recover the column id behind an argument (see
`getExpressionArgColumnId`), used by the system-function-override recipe.

```ts title="TypeScript"
export interface AdaptableExpressionContext extends BaseContext, AqlExpressionContext 
```

###### Extends

[`BaseContext`](https://www.adaptabletools.com/docs/reference/basecontext.md), `AqlExpressionContext`

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [argNodes](https://www.adaptabletools.com/docs/reference/expressioncontext.md#argnodes) | `AST_Expression[]` | Raw AST nodes of the current function&#39;s arguments, index-aligned with<br/>the evaluated `args` array. Best-effort: `undefined` for computed args<br/>(e.g. `LOWER([make])`). Use with `getExpressionArgColumnId` to recover<br/>subject provenance — e.g. to fetch a column&#39;s raw value from within a<br/>custom/extended handler. |
| [columnScope](https://www.adaptabletools.com/docs/reference/expressioncontext.md#columnscope) | `string` | Column a scoped rule applies to — the subject of `$SCOPE`. Present only<br/>where the calling module supplies a scope (ColumnFilter, Badge, …). |
| [adaptableContext](https://www.adaptabletools.com/docs/reference/expressioncontext.md#adaptablecontext) | `any` | Custom application Context provided in `AdaptableOptions.adaptableContext` |

## Property Details

### argNodes

Raw AST nodes of the current function&#39;s arguments, index-aligned with
the evaluated `args` array. Best-effort: `undefined` for computed args
(e.g. `LOWER([make])`). Use with `getExpressionArgColumnId` to recover
subject provenance — e.g. to fetch a column&#39;s raw value from within a
custom/extended handler.

```ts title="TypeScript"
argNodes?: AST_Expression[];
```

###### Property Value

`AST_Expression[]`

### columnScope

Column a scoped rule applies to — the subject of `$SCOPE`. Present only
where the calling module supplies a scope (ColumnFilter, Badge, …).

```ts title="TypeScript"
columnScope?: string;
```

###### Property Value

`string`

### adaptableContext

> *Inherited from [BaseContext](https://www.adaptabletools.com/docs/reference/basecontext.md)*

Custom application Context provided in `AdaptableOptions.adaptableContext`

```ts title="TypeScript"
adaptableContext: any;
```

###### Property Value

`any`
