1
votes

I have a spreadsheet that writes a calendar event when the form is submitted. As you know, when the form response is edited using the response url, on form submit triggers are not triggered.

https://code.google.com/p/google-apps-script-issues/issues/detail?id=2969#c12

indicates that if the script is attached to the form, then it will trigger. I took the script that was working in the spreadsheet, and transplanted it to the form, and it works with new forms, but still not with edited responses.

So the main question is whether it triggers when the response is edited or not?

If the answer to the above is 'yes' then the related questions are:

Am I correct to assume I need to change the coding of the script to work with FormResponse objects (e.response) rather than the spreadsheet returns?

Can I still set the trigger manually using the Resource menu or do I have to set it programmatically now?

(If the answer is no, then I will be drawing upon Send email when Google Form submission is updated to accomplish the same thing within the spreadsheet...but would prefer to avoid the added complexity of a script that I don't fully understand)

Thanks

1

1 Answers

0
votes

You can figure out whether some code ran by using a Logger.log() statement:

Logger.log("It ran!");

And then checking to see if anything printed to the log. Choose the VIEW menu, and then the LOG item from within the code editor.

You've already tried triggering the code from both the spreadsheet and the form, so just add a Logger.log() statement to determine if the code is running or not.

If you try using that code from the other answer, and run into a problem, just determine which line of code is giving the error, and post a question. If there is an error executing the code, there will be an error msg in the EXECUTION TRANSCRIPT. That's under the VIEW menu. Post what the error msg is, and what line of code the error is from.

If there is no error, but the results aren't what you want, then post the results compared to what you want.