I have data in "Form Response Sheet". When user submit the form data saved in "Form Response Sheet". I want to move data from "Form Response Sheet" to "verified Form Response" sheet when user mark true in column w and Press "Submit" button. The row should be deleted from the "Form Response sheet" and Should be moved to Verified Form Response sheet.
The Verified Form Response Sheet contains daily data which was moved from Form Response Sheet. The moved data should be moved after the data earlier moved. The Sheet is also shared with my team member. The Script I used is not running with him.
The link of the sheet is as below:
https://docs.google.com/spreadsheets/d/1LUUEZ7sSjBy-WWL3TZt8l6sqtrEBn3dZ03iRDTY1bF0/edit?usp=sharing
The script I am using is as below:
function copyInfo() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var copySheet = ss.getSheetByName("Form responses 1");
var pasteSheet = ss.getSheetByName("Verified Form Responses");
var pasteSheet_size=pasteSheet.getRange('A2:A').getValues().filter(String).length;
var source_size=copySheet.getRange('A2:A').getValues().filter(String).length;
var source_range = copySheet.getRange(2,1,source_size,copySheet.getLastColumn());
var move_data = source_range.getValues().filter(row=>row[22]==true);
var source_data = source_range.getValues().filter(row=>row[22]==false);
pasteSheet.getRange(pasteSheet_size+1,1,move_data.length,move_data[0].length).setValues(move_data);
source_range.clearContent();
copySheet.getRange(2,1,source_data.length,source_data[0].length).setValues(source_data);
}