I reached out to the google app script community to request assistance with a custom script for my google sheets spreadsheet some time ago. It worked great and as intended when the original workbook was in use, however in the past couple months since I last employed the script something has changed. I am receiving an error in the debug of the script that seems to be the culprit. Script below:
function onEdit(e){
if(e.value == "TRUE")
e.source.getActiveSheet().getRange(e.range.rowStart,e.range.columnStart+1).setValue(new Date());
else if(e.value == "FALSE")
e.source.getActiveSheet().getRange(e.range.rowStart,e.range.columnStart+1).clearContent();
else return;
}
Upon debugging it seems VALUE in e.value is the issue resulting as undefined. Error type 'Cannot read property 'value' of undefined' in the first if argument. I am unsure if there are any other bugs, however it appears this is the only one.
The purpose of this script is to enter the date of the day the checkbox in the adjacent cell is ticked true.
