I know that when a new response is submitted on Google form, a new row is auto-added to the linked spreadsheet. I use several onformsubmit
triggers for my form and linked spreadsheet. But I do not know why more than one row (sometimes more than 100) are being added, which is unnecessary. I have searched Google and Youtube but I think I could not find anything helpful. why is that happening? and how to avoid it?
Google-sheets – Google form adding more than one row every time
google sheetsgoogle-apps-scriptgoogle-apps-script-triggersgoogle-forms
Related Topic
- Google-sheets – Google Sheets QUERY won’t display cell text if other cells have numbers
- Google-forms – Edited Google Form while users were responding – how to recover initial responses
- Google-apps-script – Google App Script If Statement Based On Cell Value
- Google-sheets – How to get new Google Form responses to take on non-form functions in Google Sheets
- Google-sheets – TypeError: Cannot read property ‘range’ of undefined at onformsubmit again after creating an event object
- Google-sheets – Google Sheets Google Forms updates
Best Answer
It's very likely that having several form summit triggers be part of the problem. Another thing that could be causing the problem is having form submissions while a form submit triggered script is running. One more thing that could be causing the problem is a know bug that that a single form submission trigger is triggered multiple times by a single form submission.
The workaround for the the last one is to check if the event object includes the responses or not, if the responses are included, continue otherwise terminate immediately.