Skip to main content
Roberty Studio
RPARows

Find rows

Find rows

Finds every row where a column matches a given value and returns them as a list.


Options​

Google Sheets connection​

Select the 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.

Sheet (tab) name or ID​

Enter the tab name (e.g. Página1) or, using the number type, the numeric ID of the tab.

Column to search in​

The exact column name, as it appears in the tab's first row (header).

Value to search for​

Enter the value to compare against the column's content, for each row of the tab.

Returns​

Javascript code​

js
actions["action-id"].rows // list of rows found, each with rowNumber and row (List)
actions["action-id"].rows[0].rowNumber // number of the first row found (Number)
actions["action-id"].rows[0].row // the first row found, as an object (Any)

Field selection​

  • rows — list of the rows found (empty if none match). Each item has rowNumber (the row's number in the sheet) and row (the row as an object relating each column name to its value) (List)

Rules and Conditions​

  • The Google Sheets connection, Spreadsheet ID, Sheet (tab) name or ID, Column to search in and Value to search for fields are required.
  • The tab's first row is always used as the header, and it is from there that the row field matches each value to its column name.
  • Every matching row is returned, in row-number order; the first occurrence is in rows[0].
  • Values are compared as text; for example, the number 10 and the text "10" are considered equivalent.
  • If the given column does not exist in the tab's header — including the case where the tab has no header row at all — the robot stops with an error.
  • If no row matches the given value, the action does not stop the run and rows comes back empty; check that the list has items before using rows[0].