问题
Firstly, I want to say that this issue is different from all previous Form Submit Trigger errors with Google Apps script. This one triggers twice, while still having access to all form submit info of the previous form submission and triggers the program again.
Furthermore, the additional form submit trigger glitch does not add a row to the spreadsheet form responses, this is because the user isn't submitting the form twice, it's on Google for triggering it. This has happened randomly about 3 times in the past few months and it is extremely critical that my program only executes once for each job. After hours of research, I was unable to find a problem similar to mine. The problem also persisted even after adding the following line of code:
if(e.values && !e.values1){return;} //To fix error when onFormSubmit triggers multiple times under one form submission //Doesn't work/do anything 6/8/2020
回答1:
Posting this for documentation purposes.
This behaviour was very recently reported on Issue Tracker, probably by the OP:
- #158892709: onFormSubmit Trigger occurs twice randomly about every few weeks for one form submission
Anyone who might be experiencing this can click the star on the top left in order to subscribe to it and also to prioritize it.
来源:https://stackoverflow.com/questions/62275601/onformsubmit-trigger-occurs-twice-randomly-about-every-few-weeks