I have one 'reporting_sheet' and one 'data_sheet'. I would like to make the 'reporting_sheet' check for data that exists in the 'data_sheet' but doesn't exist in the 'reporting_sheet' and move that over as soon as the data is entered in 'data_sheet' (On Edit)
result expected in reporting_sheet : 
I tried this:
function onEdit(e) {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const [sheet1, sheet2] = ["reporting_sheet", "data_sheet"].map(s => ss.getSheetByName(s)); // set sheet names
var Avals = sheet1.getRange("A1:A").getValues(); // getting last row of column A
var lastRowSheet1 = Avals.filter(String).length;
const sheet1Obj = sheet1.getRange("A2:A" + lastRowSheet1).getValues().reduce((o, [a]) => (o[a] = true, o), {});
const sheet2Values = sheet2.getRange("A2:E" + sheet2.getLastRow()).getValues();
const values = sheet2Values.filter(([a]) => !sheet1Obj[a]);
if (values.length == 0) return;
sheet1.getRange(lastRowSheet1 + 1, 1, values.length, 5).setValues(values);
// sheet1.sort(1);
}
Issue with the code : It only compares the first column between both sheets and dumps the data if there's a new unique value in the A column of 'data_sheet' which doesn't exist in the 'reporting_sheet'. How do I make it look for columns A to E?
Sorry I am a newbie.

