Google Sheets action - Search rows
How it works
This action allows you to search for rows in a sheet using search values in each individual column. The action will search for exact matches of the search values you provide.
How to use it
The following example will demonstrate how to use the
Search rows action in conjunction with
Our sample sheet is a list of items from different countries. For Google Sheets connector to work, the sheet needs to have at least 1 header row and 1 data row.
We realise there is an error in rows 3 & 4:
Region of "Australia" should be "Australia and Oceania", not "Asia". Let's use the following Workato recipe to correct that. It will search for rows with
Country = "Australia" and
Region = "Asia", then update the
Region to "Australia and Oceania" instead.
This is how we setup the Search & Update actions:
Step 1 - Search rows: We set
Region= "Asia" and
Country= "Australia". The action will search for rows matching those conditions.
Step 2 - Repeat action: Loop through the rows from
Search rowsresult, using the
Step 3 - Update row: Use
Row numberdata pill from the the
Foreachloop to tell the action which row to update. We set the new
Regionvalue to "Australia and Oceania".
After we run the recipe, rows 3 & 4 are correctly updated:
|Spreadsheet||You can either select a spreadsheet from the dropdown, or use
|Sheet||You can either select a sheet from the dropdown, or use
After you select a spreadsheet and a sheet, the columns in that sheet will be displayed here. Enter the values you want to search and Workato will search for exact matches of all those values.
For example, in the screenshot above, Workato will return all rows that satisfy this condition:
|Spreadsheet ID||ID of the spreadsheet. You can map this into
|Spreadsheet name||Name of the spreadsheet.|
|Sheet name||Name of the sheet. You can map this into
Expanding the pill, you will see the each row's