I have a Google spreadsheet for which I have written a script which uses both onEdit
and onChange
triggers. I am trying to figure out the scenarios on which the events trigger. There are few scenarios like:
When I delete/add a value from/to an existing cell, I’m expecting the onEdit
event to get triggered but instead sometimes onChange
triggers even though the action is considered to be manipulation of an existing cell.
https://developers.google.com/apps-script/reference/script/spreadsheet-trigger-builder#onchange
Similarly, when I delete a column, instead of onChange
, onEdit
event triggers.
Is there an order of priority based on which these triggers work when put together in a script?