I am right now working on a project with a sheet with multiple tabs in it. I am trying to get multiple functions to run, one of which I found here at stackexchange.
Here is the function:
function addFirstRow() {
var firstRow = 1;
var sh = ss.getActiveSheet();
var lCol = sh.getLastColumn();
var range = sh.getRange(firstRow, 1, 1, lCol);
var formulas = range.getFormulas();
sh.insertRowsAfter(1, 1);
newRange = sh.getRange(firstRow, 1, 1, lCol);
newRange.setFormulas(formulas);
}
I want to call this function from a separate tab in which it's going to run. I intend to create another function to do this. I want to have this run when I enter information into a cell on this other tab, and then have this function create the row on my target tab. What would it look like to call this function from another one?