value expression instead of reading a stored
property directly. Powersheet computes it in the browser every time the sheet renders.
There are two kinds, and one character in the binding decides which you get:
- a stored computed column writes its result back to the property it binds to, and
- a display-only computed column stores nothing — it exists in the sheet and nowhere else.
Prerequisites
- A working sheet configuration YAML file
- A data model whose properties you want to compute from
- Familiarity with dynamic value expressions (
() =>syntax)
Decide Whether the Value Should Be Stored
The binding key decides. A key prefixed with$ is unbound: it names a column, not a property.
1
Add a Stored Computed Column
Bind the column to a real property and give it a The user cannot type into the column — a computed column is read-only, because its content comes
from the expression rather than from input. Editing
value expression. The result is written to that
property, so it saves with the rest of the row:count or rate recomputes it, marks
the row modified, and the new total persists on the next save.2
Add a Display-Only Computed Column
Prefix the binding key with Nothing is written anywhere. The column appears in the sheet, is read-only, and leaves the work
item untouched — saving the row does not create or update a If you leave
$ to name a column that has no property behind it:riskScore field.The $ marker belongs on the last segment only. Everything before it is an ordinary path that
must resolve in the data model, and it decides which entity the column reads from:title out, the header shows the name without the marker — $riskScore displays as
riskScore.3
Choose the Result Type
A display-only column has no metadata to take its type from, so declare it with
valueType:valueType is for unbound columns only.A bound column takes its type from the data model, so declaring valueType on one is rejected.
And because there is no metadata to consult, valueType: date cannot distinguish a date from a
date-time — set format if you need the time part shown or hidden.4
Total a Numeric Column in Group Rows
A numeric display-only column can be aggregated into group rows like any other numeric column:
aggregate requires valueType: number — declaring it on a text or date column is rejected.5
Read the Row and the Level Above
Inside an unbound column’s
value expression you can reach past the current entity:What a Display-Only Column Cannot Do
A display-only column stores nothing and resolves no metadata, so several column properties do not apply to it. Each one is rejected outright rather than ignored:render, renderers, format, groupBy, sort, filter, columnGroup, and the styling
properties all work normally.
Verify
After saving the configuration, do a full browser reload or re-open the document — the in-sheet refresh button reloads data, not the configuration. You should now see:- The computed column shows its derived value on every row
- Clicking a cell does not enter edit mode, and pasting into the column changes nothing
- Editing a property the expression reads updates the derived cell immediately
- For a stored computed column, the row is marked modified and the value persists after save
- For a display-only column, saving leaves the work item untouched
- Grouping, sorting, filtering, sheet search, and Excel export all use the derived value
Grouping and sorting keep the keys they were built with.A derived cell repaints as soon as a property it reads changes, but an active grouping or sort
is not rebuilt from the new values. Reload the sheet to regroup or resort on the updated keys.
Troubleshooting
See Also
- Add a Column — basic column setup and property binding
- Configure Dynamic Expressions —
() =>expressions across the whole sheet configuration - Configure Read-Only Column — how read-only is resolved
- Use JavaScript in Display and Render — change appearance without changing data
- Create a Computed Property — compute on the server with Velocity instead
- Columns — complete column property reference
- Binding Syntax — binding path patterns, including the
$marker - Dynamic Value Expressions Reference — the context object and where each expression runs