Skip to main content
Roberty Studio
RPARows

Update row

Update row

Updates a row of the table, found by its row number or by a column/value filter.


Options​

Google Sheets connection​

Select the Google Sheets Connection action set up in the flow.

Spreadsheet ID​

Enter the ID of the spreadsheet. The ID can be found in the spreadsheet URL: docs.google.com/spreadsheets/d/{spreadsheetId}/edit.

Table name​

Enter the name of the table, for example Clientes.

Locate the row by​

Choose how the row is found: Column and value (default) or Row number.

Column to search in​

Visible when finding by Column and value. Enter the exact column name, as it appears in the table header, for example Email. The column and value must identify a single row.

Value to search for​

Visible when finding by Column and value. Enter the value to search for in the given column.

Row number in the sheet​

Visible when finding by Row number. Enter the row's number in the sheet, the same one shown on the side of Google Sheets (not its position inside the table). The header row is not a data row: in a table whose header is on row 1, the first data row is 2; with the header on row 5, it is 6.

New column values​

Add the header-and-value pairs to update in the row found. For each item, enter the Header (the column name, exactly as it appears in the table header) and the new Value to write. Use the "Add value" button to include more columns. Header columns you do not give keep their current value.

Advanced options​

Source of the column values​

Choose between Header and value (a list of pairs built in the form) or Custom code (replaces the list with a code field). Default: Header and value.

New column values (code)​

Visible only when the source is Custom code. Enter an object matching each column name to the new value — e.g., as code: { "Nome": nome.value, "Status": "Concluído" }. You can also reference the output of a previous action or a variable that already holds an object in that shape. Columns not given keep their current value.

Returns​

Javascript code​

js
actions["action-id"].rowNumber // number of the row updated (Number)
actions["action-id"].row // the row after the update, as an object (Any)

Field selection​

  • rowNumber — Number of the row updated.
  • row — The row after the update, as an object matching each column name to its value.

Rules and Conditions​

  • The Google Sheets connection, Spreadsheet ID and Table name fields are required.
  • When finding by Column and value, the Column to search in and Value to search for fields are required. When finding by Row number, the Row number field is required.
  • At least one column to update (in "Header and value" mode) or the values code (in "Custom code" mode) must be given.
  • The given table must exist in the spreadsheet; otherwise the robot stops with a table-not-found error.
  • When finding by Column and value: if no row matches, the robot stops with a row-not-found error; if more than one row matches, the robot stops with an ambiguity error (use a column with unique values, or update by row number).
  • When finding by Row number: if the row does not exist within the table's bounds, the robot stops with a row-not-found error.
  • At least one of the headers given in New column values must match exactly (including upper and lower case) a header existing in the table; otherwise the robot stops with a column-mapping error.
  • Table columns not given in New column values keep the row's current value.