I am using google script onChange trigger by adding it manually. The sheet is fetching data from an external source and creating new rows as the data is received. So there are 2 events taking place.
The onChange() trigger is running twice for the same reason but I need to just run it once. Any help would be great. Thanks.
So, for onChange
there is e.g. the event object changeType
which can contain the values
This can help you to specify that your script shall run only if a certain type of Change
takes place.
Sample:
function runMeOnIsertRow(e){
if(e.changeType == 'INSERT_ROW'){
//do something
} else{
return;
}
}