My current code grabs the values of the same range of data for Values, Notes, and Background Colors into 3 separate arrays. Then it filters the Values array by the first item in the nested array, returning only the items that matches the defined statArray array item. Now I want the other two array filters (Notes, Background) to be filtered by the indexes of the returned items from the filtered Value array. That way when I set the Backgrounds and Notes arrays they overlap correctly onto the values.
function moveAllNew() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var activeSheet = SpreadsheetApp.getActiveSheet();
var activeSheetName = activeSheet.getName();
var lastRow = activeSheet.getLastRow();
var lastColumn = activeSheet.getLastColumn();
var statArray = ["Captures Sent 📩","QA In Progress 👌","Bagging in Progress 01 🎒","Bagging in Progress 02 🎒","Bag Sent 📩","Bag Rejected ❌","Bag Accepted ✅","Captured 📷",""];
var rowHeaderCount = 3;
var rowStart = 4;
var columnFormulaB = 2;
var columnFormulaS = 19;
var columnFormulaAC = 29;
// gets the range of the current sheet
var activeRange = activeSheet.getRange(rowStart,1,lastColumn-rowHeaderCount,lastColumn);
var activeRangeFormulaB = activeSheet.getRange(rowStart,columnFormulaB,lastRow-rowHeaderCount);
var activeRangeFormulaS = activeSheet.getRange(rowStart,columnFormulaS,lastRow-rowHeaderCount);
var activeRangeFormulaAC = activeSheet.getRange(rowStart,columnFormulaAC,lastRow-rowHeaderCount);
// creates array of the active sheet (values, notes, backgrounds, and formula columns (B, S, AC))
var activeRangeValues = activeRange.getValues();
var activeRangeNotes = activeRange.getNotes();
var activeRangeBackgrounds = activeRange.getBackgrounds();
var activeRangeFormulaB = activeRangeFormulaB.getFormulasR1C1();
var activeRangeFormulaS = activeRangeFormulaS.getFormulasR1C1();
var activeRangeFormulaAC = activeRangeFormulaAC.getFormulasR1C1();
// filtered QA arrays
var qaSheet = ss.getSheetByName("QA 👌");
var qaRangeValues = activeRangeValues.filter(function(item){return item[0] === statArray[0] || item[0] === statArray[1];});
var qaRangeNotes = activeRangeNotes.filter(function(item){return item[0] === statArray[0] || item[0] === statArray[1];});
var qaRangeBackgrounds = activeRangeBackgrounds.filter(function(item){return item[0] === statArray[0] || item[0] === statArray[1];});
Logger.log(qaRangeValues);
Logger.log(qaRangeNotes);
Logger.log(qaRangeBackgrounds);
Currently the qaRangeValues and qaRangeNotes arrays would come back empty because the statArray item is never a color nor a note value.