Skip to content
Advertisement

Several onEdit() functions inside only one not works

I have an onEdit() function that hosts 3 different onEdit() functions. I know the question has been asked several times and I have tested the solutions of many of these answers but I don’t understand why it doesn’t work.

In my script, which I wrote based on the most relevant answer, onEdit1(event) and onEdit2(event) work but not onEdit3(event). I have the impression that there is a problem with “event.range” but I can’t solve it.

Can you tell me what I did wrong?

Here is my script:

JavaScript

Advertisement

Answer

I rewrote them as below:

JavaScript
  • The one requires permissions so it needs to be an installable trigger
JavaScript
  • This line has an undefined variable

    JavaScript

    }

The other possibility is that number 3 just takes to long because simple triggers must finish in 30 seconds. Try using installable trigger.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement