Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Why don't my onEdit script keep runing?

$
0
0

I'm new to coding and google app scripts. I write a onEdit script, and when I run it, it shows me. "Start running", and 1 second later "Finished". It doesn't show me any error. How do I make it keep running? This is my script:

function onEdit() {  var s = SpreadsheetApp.getActiveSpreadsheet();  var r = s.getActiveCell();  if (s.getName="Reading Log" && r.getColumn() !=2) {    r.offset(0,-1).setValue(new Date()).setNumberFormat("MM/dd/yy")  }}

What I want to do is that I have a google sheet reading log. On sheet 'Reading Log' column 2, I'm going to put the name of book or article I read. I want the script automatically fill in the date I enter the name into column 1 next to it. I'll be happy if someone could help me fix it or write a better script. Thank you!


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>