New to expressions and formulas? Try Expressions: The Essentials.
You can also learn more about other types of expressions.
A dereference expression gets the value of a column from a specific row of another table. A dereference expression makes use of references between tables, using the value of a column of type Ref in this table to find a specific row in another table and get a value from a column there.
Form and Meaning
A dereference expression is of the form:
ref-column is the name of the column of type Ref in the this table, and
value-column is the name of a column of the other table.
The configuration of a column of type Ref identifies the table in which referenced rows are to be found:
The value of a Ref column should be the key column value of a row in the Ref column's source table.
The Order Capture sample app includes a typical dereference expression. The Order Details table uses the dereference expression,
[Product].[Price], to retrieve the product's price from the Products table. This dereference expression can be thought to mean:
- Go to the source table identified Product column's configuration.
- In that source table, find the row with a key column value that matches the Product column of this row.
- From that row in the source table, get the value of the Price column.
Chained Dereference Expressions
You can dereference a dereference.
For example, you might have a three-level hierarchy consisting of a Customer row, a child Order row, and a grandchild Order Detail row. The Order Detail row contains a reference to the Order row. The Order row contains a reference to the Customer row.
From the Order Detail row, you can directly access the value of a column in the Customer row by chaining dereference expressions. That is, you can dereference from the Order Detail row to the Order row, and then dereference from the Order row to the Customer row in a single expression.
[Order Id].[Customer Name].[Email]
For more information on dereferences, check out this video: