function onEdit(e) {
var s = SpreadsheetApp.getActiveSheet();
var r = s.getActiveCell();
var activeRow = r.getRow()// gets row of cursor
var nextCell = r.offset(0, 1);// references cell directly to the right of the active cell
var nextCellValue = nextCell.getValue(); //gets value in cell directly to the right of the active cell
Logger.log(nextCellValue)
Logger.log('New Value (from e.value) = '+e.value) //logs new value entered into active cell
Logger.log('Old Value (from e.oldValue) = '+e.oldValue)//logs old value that was in active cell
if( r.getColumn() == 4 && activeRow >9|| r.getColumn() == 6 && activeRow>9) {
if( nextCellValue == '' && e.value=='TRUE') {
nextCell.setValue(new Date());
}
else if(nextCellValue!=''&& e.value=='FALSE'&& e.oldValue=='true'){
nextCell.setNote(nextCellValue) //if there was an old value it sets it as a note and clears the cell.
nextCell.clearContent()
}
}
}