I have the following code to move an entire row based on a drop down menu, however, the code does not work for rows which are added to the sheet through a google form. Does anyone have any ideas why this might be happening?
The code I'm using is as follows:
function onEdit(e) {
const src = e.source.getActiveSheet();
const r = e.range;
if (r.columnStart != 12 || r.rowStart == 1 ) return;
const dest = SpreadsheetApp.getActiveSpreadsheet().getSheetByName(e.value);
src.getRange(r.rowStart,1,1,12).moveTo(dest.getRange(dest.getLastRow()+1,1,1,12));
src.deleteRow(r.rowStart);
}
The sheet which I want to move the rows to is titled: "printed", and the dropdown menu to is in column L. The only available option in the drop down menu is "printed". Rows will be populated through a google form.