Move data
How to move an updated row to top or bottom of the sheet
You can use Move Row action to move the latest response to top or bottom of the sheet.
Steps:
- Select an update trigger on the sheet
- Define a Move Row action
- Select the same sheet in the sheet field of the action
- Select “append top” or “append bottom” accordingly in Row Position option
How to move a row to a different spreadsheet / workbook
You can specify the spreadsheet URL or ID in the target sheet field of Move Row action.
- Find the spreadsheet URL. ID is part of the URL.
- Enter the spreadsheet URL or ID and “#” prior to the sheet name. For example,
YOUR_SPREADSHEET_ID#sheet name
.
Note
Now both URL and ID are supported.
Spreadsheet ID is a piece of text that identifies each spreadsheet. It can be extracted from its URL, for example, https://docs.google.com/spreadsheets/d/{THIS IS THE ID}/edit#gid=0
.
How to copy part of the updated row to another sheet
To copy part of the row, you need to use Create Row action.
Steps:
- Select an update trigger on the sheet
- Define a Create Row action with the target sheet specified
- Specify the columns you want to copy and use column variables to pull data from the row
How to distribute rows to multiple sheets based on column value
There are cases when you want to distribute data from the master sheet to multiple sub sheets. Let’s say the sub sheet is determined using the value in column H. The data under “sales” category will be moved to “sales” sheet. The data under “support” category will go to “support” sheet. And so forth.
You could create multiple rules to do it. However it is not optimal due to the duplication of rules. When there is a new category, you have to create a new rule.
There is a way you can achieve this flexiblly using variable:
- Select any trigger that suits your needs
- Define a Move Row action
- Specify the target sheet field as
{column_H}
You can also specify the sheet name with string concatination. For example: team-{column_H}-queue
.
How to check if a row exists in the target sheet before copying it
To check if a row exists, you need to use Lookup Row action. Assume your column A has a unique ID to identify the row.
Steps:
- Define a Lookup Row action
- Specify the column as A and value as “{column_A}”
- Define a Conditional Action
- Add a Variable Condition to check if lookup_row is 0
- Add Copy Row action to move the row
The copy row action will not be fired if lookup_row is found.