The TABLE() function lets you look up values from your pricing tables directly inside calculator pricing formulas. Instead of writing complex conditional logic, you pass in the table name and one or two keys, and the function returns the matching value. This keeps your formulas clean and your pricing data easy to maintain separately. You can use TABLE() in any formula field throughout Calculator Editor → Options & Pricing.
| Syntax | Description |
|---|---|
TABLE("name", key) |
1D lookup — returns the value for the matching key. |
TABLE("name", rowKey, colKey) |
2D lookup — returns the value at the intersection of the row and column keys. |
TABLE("name", rowKey, colKey, "mode") |
2D lookup with explicit mode override. |
TABLE("tableName", key)
tableName is the exact name of your pricing table (in quotes). key is the value to look up — a literal value or an option reference like OPT("MATERIAL") or INPUT("WIDTH").
TABLE("tableName", rowKey, colKey)
rowKey matches against the table's row keys. colKey matches against the column keys.
The lookup mode controls how keys are matched. Each table has a default mode set when you create it, but you can override it per-call by passing a fourth argument: TABLE("name", rowKey, colKey, "interpolate").
| Mode | Value | Behavior |
|---|---|---|
| Exact match | "exact" |
Returns the value only when the key matches exactly. |
| Nearest lower | "nearestLower" |
Finds the closest key that is less than or equal to the input. |
| Nearest upper | "nearestUpper" |
Finds the closest key that is greater than or equal to the input. |
| Nearest | "nearest" |
Finds the closest key in either direction. |
| Interpolate | "interpolate" |
Linearly interpolates between the two nearest keys. Numeric keys only. |
TABLE("materials", OPT("MATERIAL")) * VAR("AREA").MATERIAL. Your formula is TABLE("materials", OPT("MATERIAL")) * INPUT("QUANTITY"). When a customer selects "Acrylic," the function looks up the acrylic price and multiplies it by the quantity.WIDTH and HEIGHT number inputs. Your formula is TABLE("sheet_prices", INPUT("WIDTH"), INPUT("HEIGHT")). The 2D table returns the price for the selected width and height combination. With interpolation mode, non-standard sizes get a calculated price between the nearest table entries.TABLE("qty_rates", INPUT("QTY"), "nearestLower"). A customer entering 30 units gets the rate for 25 (the nearest key ≤ 30).