My colleague and I are teachers and do not have much background in programming. We have pieced together a script that creates a Google Calendar event from a Form fed spreadsheet; however, we cannot get the trigger to work.
Many have suggested moving away from time-based triggers because they can be unreliable, so we'd like to write our own trigger. After researching, it seems an onEdit(e) trigger would be best, but we can't get it to work conditionally. We'd like our script only to run if the approval column says "Yes" (column 13).
From what I've seen, it looks like we should probably be doing this completely differently (maybe with getValue), so I'm calling on everyone here for help. It seems like it should be so simple! FYI, findRow works and makes the calendar events, so we just need findRow to run if column 13 is "Yes."
Any help you can give is greatly appreciated. Here is the code:
function onEdit(e) {
var range = e.range;
var colToCheck = 13;
if (colToCheck = "Yes");
findRow;
};