Replies: 1 comment
|
I asked Claude to lay out my solution in a straightforward, step-by-step manner, so this should be pretty easy to follow. Let me know if you need any extra help. 1. You must not be in Edit mode. This is the counter-intuitive one: Add field, Calculate and the column menu are all rendered under 2. The layer has to be an in-store GeoJSON layer. The gate is const canManageColumns =
Boolean(layer?.geojson) && !isDuckDBLayer && !isReadOnlyVectorLayer && layerCaps.update;with the reason stated right above it in the source: column management mutates 3. The layer needs at least one feature — 4. Then the flow is: Layers panel → Open attribute table → + Add field → name it → Edit → type values → Save. The docs describe the second half under Editing values: "For editable layers (including GeoJSON layers and materialized DuckDB layers), click Edit to change attribute values inline, then Save to commit them." 5. If what you want is a computed column rather than typed values, use Virtual Fields in the layer's Style panel instead — expression-backed columns that recompute whenever the data changes, show up everywhere real fields do (attribute table, styling, labels, selection), and persist with the project. The attribute table's Field Calculator is the other half of that pair: it writes static values once. If Add field still isn't there with the table out of Edit mode, say how the layer was added (file drop, Add Vector Layer, DuckDB, SQL Workspace) — that's what decides which of the gates is closing. |
Uh oh!
There was an error while loading. Please reload this page.
I am unable to add a new Attribute to a table? I want to Mark down things that belong to a feature and I cannot because I cannot write fields and I cannot create new fields?
All reactions