# Update variable path

Write a declared workspace variable, validating its saved type before committing.

Canonical URL: https://opennodeflow.dev/wiki/reference-app-variables-core-variable-updatepath/
JSON reference: https://opennodeflow.dev/wiki/reference-app-variables-core-variable-updatepath/index.json
Source snapshot: 2026-10-23

Choose a workspace variable in Configuration and explicitly bind it to save its exact ID and declared type/version on this node. Bound Value sockets use that exact type, without creating per-variable library definitions. Renaming a bound variable preserves its identity; deleting/recreating its name does not retarget this node. Existing unbound nodes keep their dynamic any sockets and name lookup until explicitly bound.

Update path replaces a JSON field or existing array item. Path is a nonempty array of string object keys / numeric indexes. Intermediate containers must exist. Unsafe prototype keys and out-of-range indexes are rejected.

All writes validate the whole resulting value against the exact pinned type and commit once in a transaction. Optional Expected revision adds optimistic concurrency protection. Writes and their run Storage before/after journal commit immediately, even if later code fails. Never automatically repeat an uncertain mutation; inspect its value and revision first. Exec/Next establish control ordering. Missing variables fail; no operation creates one implicitly.

Runtime helpers are context.variables.get/set/increment/append/compareAndSet/updatePath. The running workflow forces workspace scope. Name-only calls remain supported; an explicit binding enforces ID/workspace/type identity. Library tests use a fresh empty sandbox. Use Secrets/Connections for credentials.


## Catalog identity

| Field | Value |
| --- | --- |
| Source key | `app.variables.core.variable.updatePath` |
| Kind | node |
| Family | app-variables |
| Pack | See library discovery |

[Integration guide](/wiki/variables/) · [Browse the catalog](/wiki/integration-catalog/)

## Inputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `exec` | Exec | control | No |  |
| `value` | Value | any | Yes |  |
| `path` | Path | array | Yes | Nonempty list of string keys / numeric array indexes; existing containers only. |
| `expectedRevision` | Expected revision | number | No |  |

## Outputs

| Socket ID | Label | Type | Required | Meaning |
| --- | --- | --- | --- | --- |
| `next` | Next | control | No |  |
| `value` | Value | any | Yes |  |
| `revision` | Revision | number | Yes |  |

## Configuration schema


```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "title": "Variable",
      "description": "Exact name in this workflow’s workspace. Choose an existing variable from the Variables menu."
    }
  },
  "required": [
    "name"
  ],
  "additionalProperties": false
}
```





## Source and installed versions

This reference describes the maintained source catalog snapshot, not a live export of your installation. Published definitions use immutable versions; installed graphs retain their exact pins. Discover and read the installed definition and selected version before wiring it. See [versioning](/wiki/versioning/), [connections](/wiki/connections/) and [integration setup](/wiki/integration-setup/).

---

## Documentation provenance

- `../OpenNodeFlow-Library/work/catalog-all.mjs`
- `../OpenNodeFlow-Library/work/azure-pack-consolidation-20261022/catalog-policy.mjs`
- `../OpenNodeFlow-Library/work/developer-packs-20261022/catalog.mjs`
- `shared/seed.ts`
- `shared/storage-library.ts`
- `shared/variable-library.ts`
- `shared/control-flow.ts`
- `shared/remote-routes.ts`
- `server/runtime-library.ts`
- `shared/error-library.ts`
- `shared/storage-model.ts`
- `shared/builtin-documentation.ts`

This page describes maintained source, not a live inventory or an authorization to perform actions.
