I am using the script below to move rows to other sheets upon edit of a cell. I need to also apply this script to work on the google form response sheet. I created a new column on the form response sheet and when marked "Yes" I need the row to move to another sheet within the workbook. Are google form response sheets different than a normal sheet? The script works on all other sheets.
function onEdit() {
var sheetNameToWatch = "New Listings";
var columnNumberToWatch = 52;
var valueToWatch = "Yes";
var sheetNameToMoveTheRowTo = "New Listings Completed";
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getActiveCell();
if (sheet.getName() == sheetNameToWatch && range.getColumn() == columnNumberToWatch && range.getValue() == valueToWatch) {
var targetSheet = ss.getSheetByName(sheetNameToMoveTheRowTo);
var targetRange = targetSheet.getRange(targetSheet.getLastRow() + 1, 1);
sheet.getRange(range.getRow(), 1, 1,sheet.getLastColumn()).moveTo(targetRange);
sheet.deleteRow(range.getRow());
}
}