---
title: "Table Update"
description: "Update rows in a workspace table."
canonical_url: "https://docs.vettero.com/build/workflows/blocks/table/update"
---
# Table Update

> Update rows in a workspace table.

<block-meta block="Yes" channels="Any" folder="table" group="Table" groupTo="/build/workflows/blocks/table" icon="i-lucide-pen" pipe="Value" scope="Any" tool="Yes" type="table.update">



</block-meta>

**Table Update** changes existing rows in a [table](https://docs.vettero.com/data/tables). Target one row by **Row ID**, or match rows with **By Query**. Only the fields you map are written.

## Configure

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

<tbody>
  <tr>
    <td>
      <strong>
        Table
      </strong>
    </td>
    
    <td>
      Workspace table to update (required)
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Mode
      </strong>
    </td>
    
    <td>
      <strong>
        By Row ID
      </strong>
      
       or <strong>
        By Query
      </strong>
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Row ID
      </strong>
    </td>
    
    <td>
      Shown in By Row ID — the row to change
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Filters
      </strong>
    </td>
    
    <td>
      Shown in By Query — which rows match
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Update One
      </strong>
      
       / <strong>
        Update Many
      </strong>
    </td>
    
    <td>
      Shown in By Query — update the first match or every match
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Fields
      </strong>
      
       / <strong>
        Field values
      </strong>
    </td>
    
    <td>
      Columns to change and their new values
    </td>
  </tr>
  
  <tr>
    <td>
      <strong>
        Only if
      </strong>
    </td>
    
    <td>
      Optional filter. The write runs only while the row still matches. Leave it empty to always write
    </td>
  </tr>
</tbody>
</table>

## 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 update
    </td>
  </tr>
</tbody>
</table>

## Pipe schema

The next block reads this on the data pipe (`pipe.value`). The value is an object:

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

<tbody>
  <tr>
    <td>
      <code>
        success
      </code>
    </td>
    
    <td>
      boolean
    </td>
    
    <td>
      Whether the update ran
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        matchedCount
      </code>
    </td>
    
    <td>
      number
    </td>
    
    <td>
      Rows that matched the target
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        modifiedCount
      </code>
    </td>
    
    <td>
      number
    </td>
    
    <td>
      Rows that actually changed
    </td>
  </tr>
</tbody>
</table>

**Only if** is checked as part of the write. Two runs can both read the same row; the one that writes second gets `modifiedCount` **0** when the row no longer matches, and the first write is left in place. Branch on `modifiedCount` (a [While](https://docs.vettero.com/build/workflows/blocks/loops/while.md) loop is the retry). Fields you did not map are not replaced.

## Use case

- Set a status after [Request Approval](https://docs.vettero.com/build/workflows/blocks/chat/request-approval).
- Patch fields collected from [Request Information](https://docs.vettero.com/build/workflows/blocks/chat/request-information) onto an existing row.

<block-page-nav>



</block-page-nav>


## Sitemap

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