I want to call a user spreadsheet function from the google form submission to update some information in the spreadsheet.
All scripts are on the same google drive.
Is there a way to do that ?
Code in my google form:
function updateSheet() {
spreadsheet = SpreadsheetApp.openById('daedaeddea');
spreadsheet.myFunction();
}
function onOpen() {
var form = FormApp.openById('deadeadaedae');
ScriptApp.newTrigger('updateSheet')
.forForm(form)
.onFormSubmit()
.create();
}
onFormSubmittrigger which can be used to run a script. Call it from the spreadsheet, not the form. - Brian