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) |
One-column lookup — returns the value for the matching key. Works for key→value tables and single-column grids. |
TABLE("name", key, "Price") |
Same lookup with an explicit column key (use your value-column header if it is not Price). |
TABLE("name", rowKey, colKey) |
Multi-column lookup — returns the value at the intersection of the row and column keys. |
TABLE("name", rowKey, colKey, "mode") |
Lookup with an explicit mode override as the fourth argument. |
TABLE("tableName", key)
tableName is the exact name of your pricing table (in quotes). key matches the values in the blue column of the grid.
For one-column tables you can omit the column key. Appify uses the sole non-empty green header in the value column (commonly Price). You may also pass it explicitly:
TABLE("tableName", key, "Price")
| Price
-----------+-------
WOOD | 2.50
ACRYLIC | 4.00
METAL | 6.50
OPT_TOKEN / HAS, not display labels)Price) = TABLE column keyTABLE("tableName", rowKey, colKey)
rowKey matches the blue column. colKey matches a green header-row column key. Either key can be numeric (INPUT) or a Choice Token (OPT_TOKEN).
| VINYL | PAPER
-----+-------+------
12 | 10 | 8
24 | 18 | 14
TABLE("sheet_prices", INPUT("SIZE"), OPT_TOKEN("MATERIAL"))The lookup mode controls how keys are matched. Each table has a default mode set when you create it. You can override it per call by passing a fourth argument:
TABLE("name", rowKey, colKey, "nearestLower")
For one-column tables with an explicit column key:
TABLE("qty_rates", INPUT("QTY"), "Price", "nearestLower")
| 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 on one-column / pair tables. Numeric keys only. Not implemented for multi-column grids yet. |
Preferred: put the mode in the fourth argument.
Compatibility: on one-column / key→value tables,TABLE("qty_rates", INPUT("QTY"), "nearestLower")is also accepted (the mode-shaped third argument is treated as a mode override). On multi-column grids the third argument is always a column key, so use the four-argument form.
TABLE("materials", OPT_TOKEN("MATERIAL")) * VAR("AREA").OPT_TOKEN("KEY") and put Choice Tokens (not labels) in the table as lookup keys — the blue column (one-column keys or multi-column row keys) and/or the green header row (multi-column column keys). OPT("KEY") is the option's numeric price contribution, not the selected choice name. String key matching is case-insensitive (one matches ONE).rowKey and colKey. Omitting colKey only works when the table has exactly one value column.MATERIAL. Your table has Choice Token keys WOOD / ACRYLIC / METAL in the blue column and a Price column. Your formula is TABLE("materials", OPT_TOKEN("MATERIAL")) * INPUT("QUANTITY"). When a customer selects Acrylic (ACRYLIC), the function looks up that rate and multiplies it by the quantity.SIZE input and a MATERIAL dropdown. Green header columns use material Choice Tokens (VINYL, PAPER). Your formula is TABLE("sheet_prices", INPUT("SIZE"), OPT_TOKEN("MATERIAL")).WIDTH and HEIGHT number inputs. Your formula is TABLE("sheet_prices", INPUT("WIDTH"), INPUT("HEIGHT")). The multi-column table returns the price for the selected width and height combination.Price header. Your formula is TABLE("qty_rates", INPUT("QTY"), "Price", "nearestLower"). A customer entering 30 units gets the rate for 25 (the nearest key ≤ 30). If the table has only that one value column, TABLE("qty_rates", INPUT("QTY")) also works when the table mode is already Nearest lower.