RowExpression.Column
ExpressionReturns an abstract syntax tree (AST) representing access to a column within a row expression.
Syntax
RowExpression.Column(columnName as text) as recordParameters
| Name | Type | Required | Description |
|---|---|---|---|
columnName | text | Yes | The name of the column to create an access expression for. |
Return Value
record — A record representing a FieldAccess AST node for the specified column name.
Remarks
RowExpression.Column returns an abstract syntax tree (AST) record that represents accessing a named column within a row expression. The returned record has the Kind field set to "FieldAccess", with Expression set to RowExpression.Row and MemberName set to the provided column name.
This is an advanced/internal function used by the Power Query engine's expression tree infrastructure. It is primarily relevant for:
- Custom connector development where query folding logic needs to construct or inspect column access expressions programmatically.
- Building row expression ASTs that can be translated to native query languages.
In normal M query development, you access columns using [ColumnName] syntax inside each expressions. RowExpression.Column is the lower-level programmatic equivalent used in the expression tree representation.
Examples
Example 1: Create a column access AST node
let
AST = RowExpression.Column("CustomerName")
in
#table(
{"Kind", "MemberName"},
{{AST[Kind], AST[MemberName]}}
)Kind | MemberName | |
|---|---|---|
| 1 | FieldAccess | CustomerName |