onEdit() Basics

Here I show some basics of using onEdit() triggers:

  • onEdit() triggers are not meant to be manually run; rather, they automatically run whenever a user changes a value on the spreadsheet.
  • An event object is typically passed to the function, typically called e, which contains information such as the range, source, oldValue, and value of the edit made.
  • You cannot have multiple functions called onEdit() in the same script file (only the last one will be recognized). Rather, consolidate all conditionals and actions into a single function.

Resources:
Simple Triggers Documentation
Event Objects Documentation

Leave a Reply

Your email address will not be published. Required fields are marked *