How to access Spreadsheet from a Google Forms submit trigger function
问题 I have a function in Google Forms script to add a Unique ID to the row being added to the associated Sheet. This function is triggered on submission of the form. Here's one version of the script I've been playing around with:- function onFormSubmit(e) { // Get the active sheet var sheet = SpreadsheetApp.getActiveSheet(); // Get the active row var row = sheet.getActiveCell().getRowIndex(); // Get the next ID value. var id = sheet.getRange("Z4").getValue(); // Check of ID column is empty if