---
title: "Update"
description: "Change existing named variables wherever they already live."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/context/update"
---
# Update

> Change existing named variables wherever they already live.

<block-meta block="Yes" channels="Any" folder="basic/context" group="Context" groupTo="/build/workflows/blocks/context" icon="i-lucide-pen-square" pipe="Value" scope="Any" tool="No" type="ctx.vars.update">



</block-meta>

**Update** (palette name **Update**) changes named variables that **already exist**. It writes on the nearest owner of that name (this body, or an outer loop/workflow scope). It does **not** create a new name. If a key is missing, the block fails with **Variable not found**.

Use [Set](https://docs.vettero.com/build/workflows/blocks/context/set) (or the Variables list on [Start](https://docs.vettero.com/build/workflows/blocks/module/start) / [Lambda](https://docs.vettero.com/build/workflows/blocks/module/lambda)) to create the name first.

Each row is a **Key** plus a **Value** (fixed or a context path). The same object is written to the data pipe.

## Configure

<table>
<thead>
  <tr>
    <th>
      Setting
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        Key
      </strong>
    </td>
    
    <td>
      Existing name other blocks already use (for example <code>
        customerId
      </code>
      
      ). Same naming rules as <a href="https://docs.vettero.com/build/workflows/blocks/context/set">
        Set
      </a>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Value
      </strong>
    </td>
    
    <td>
      Literal or a variable path from this block’s context
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Add variable
      </strong>
    </td>
    
    <td>
      Appends the row
    </td>
  </tr>
</tbody>
</table>

Add as many rows as you need. Duplicate keys are ignored.

## Handles

<table>
<thead>
  <tr>
    <th>
      Handle
    </th>
    
    <th>
      Role
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <strong>
        In
      </strong>
      
       (target)
    </td>
    
    <td>
      Incoming connection
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Out
      </strong>
      
       (source)
    </td>
    
    <td>
      Continues after the names are updated
    </td>
  </tr>
</tbody>
</table>

## Pipe schema

The next block reads this on the data pipe (`pipe.value`).

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      Updated variables
    </td>
    
    <td>
      object
    </td>
    
    <td>
      One property per <strong>
        Key
      </strong>
      
      , with that row’s resolved value
    </td>
  </tr>
</tbody>
</table>

Downstream blocks can also bind the names directly.

## Use case

- After creating `total` on the main path, update it inside a loop so the main path still sees the new total.
- Set flags that later [conditions](https://docs.vettero.com/build/workflows/blocks/condition) on the main graph should see.

<block-page-nav>



</block-page-nav>


## Sitemap

See the full [sitemap](https://docs.vettero.com/sitemap.md) for all pages.
