I am using a Google Form and it's response automatically saves to a spreadsheet. I can get response ID in a script with the form:
function submitForm2(e) {
Logger.log(e.response.getId());
}
I want to save the id to the spreadsheet. How can I do for that?
You would do something like:
function submitForm2(e) {
var sheet = SpreadsheetApp.openById('----------').getSheetByName('Form responses 1');
sheet.getRange(sheet.getLastRow(), --).setValue(e.response.getId());
}
Insert the ID of the target Spreadsheet and the column index of the first empty column in the sheet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With