A web app script I’m using for Google Sheets doesn’t seem to be working half the time.
It’s a timestamp that should also show the user ID of the editor. But most of the time it works for like a few seconds and then the user ID disappears:
Here’s a gif
Same gif via GIPHY
Here’s a gist of the script I’m using:
function addTimestamp(e) {
var row = e.range.getRow();
var col = e.range.getColumn();
if(row >= 5 && col == 2){
e.source.getActiveSheet().getRange(row,29).setValue(new Date());
}
if(row >= 5 && col == 2){
e.source.getActiveSheet().getRange(row,30).setValue(Session.getActiveUser().getEmail()); Logger.log(email);
}
What am I doing wrong?
Thanks in advance!
New contributor
Panopheles is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
10