I am trying to organize my code for a table in multiple script files. In the script editor, I can create as many .gs files as I want, but I canβt figure out how to access the code that will be defined in another script.
A simple example of what I would like to achieve:
Code.gs:
function onEdit(){ myFunctionFromLibrary_gs(); }
Library.gs:
function myFunctionFromLibrary_gs(){ Browser.msgBox("hi there"); }
OnEdit () is obviously triggered by a trigger. Unchanged, this will result in a Runtime-error, indicating that
myFunctionFromLibrary_gs TypeError: is not a function, it is undefined.
So how can I do this work, or is it currently not supported?
Thanks in advance for your help.
source share