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
pulJobIdsmeet all the same restrictions that apply to simple trigger functions? If not, then of course it cannot run when it is activated by a simple trigger. You don't provide any idea of what that code does, so we can only assume it requires permissions that it does not have when executed as a simple trigger. Also note thate.sourceis aSpreadsheet, not aSheet- use eithere.range.getParent().getName()ore.source.getActiveSheet().getName()instead. - tehhowch