I am trying to create a basic attendance workflow where my users will mark attendance in a google spreadsheet. There are separate worksheet for each month. Column E is where users will mark attendance using their gmail login. Column F will set a timestamp in adjacent cell when value was selected in column E.
I have a workable code but that works only for me. When other users of the sheet add or update value in the Column E, the Column F does not set a timestamp.
Update: I have protected Column F so that users can't manually edit the timestamp entry.
This is the piece of code:
function onEdit(e) {
var columnToWatch = 5, columnToStamp = 6; //change all of these to your needs
    if (e.range.columnStart !== columnToWatch ||  !e.value) return;
    e.source.getActiveSheet()
        .getRange(e.range.rowStart, columnToStamp)
        .setValue(new Date());  
}
