Reputation: 13
I created the following onEdit function on Google Scripts to trigger the pullJobIDS function. The pullJobIDS function is working properly but the problem is with the onEdit function. I don't know why is not triggering. Can you see any syntax mistake?
The goal is to run the pullJobIDS function when any value in the Column with index 2 is modified different from NULL and in the Organisational Structure sheet only.
function onEdit(e) {
if (e.source.getActive().getName() == 'Organisational Structure' && e.range.getColumn() == 2 && e.range.getValue() != "") { pullJobIDS() }
}
I would appreciate any help with this. Thanks
Upvotes: 0
Views: 3266
Reputation: 201683
The reason is that your script occurs an error at e.source.getActive().getName()
. You can see the error by Execution transcript. In order to remove this error, please modify as follows.
e.source.getActive().getName()
e.source.getActiveSheet().getName()
pullJobIDS()
is run.pullJobIDS()
, please use the installable trigger.If I misunderstand your question, I'm sorry.
Upvotes: 1