title: Google Sheets script remove sheet range after transferring based on filterLogic
body: <p>I have two sheets, 1. sourceData 2. Done
  sourceData has one column that is either marked 'ACTIVE' or a is a 'Date' value. What I want to do is to move those rows with column marked ACTIVE to another sheet called 'DONE'. I wrote a script here which works in transferring the data, but rows from the sheet 'ACTIVE' will be transferred over and over again if i run this script on a schedule. Is there any way to remove the rows once they have been transferred? or change the cell value of 'ACTIVE' to something else so that it fails the filterLogic? Any help is welcomed, thank you!</p>
  
  <pre><code>function tsfActive() {
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var pr = ss.getSheetByName("sourceData");
    var ts = ss.getSheetByName("DONE");
    var originalData = pr.getRange(2,1,pr.getLastRow()-1,3).getValues();  
    var data = originalData.filter(filterLogic);
      Logger.log(data);
    ts.getRange(ts.getLastRow()+1,1,data.length,3).setValues(data);
  }
    var filterLogic = function(item){    
      if(item[1] === "ACTIVE"){
        return true;
      }
      else{
        return false;
      }
    }
  </code></pre>