0

My case is that I have a Google Form that populates a sheet. But I also have a other sources such as a Bot, that is able to add a new row. The bot always adds the new row at the very end of the sheet (getLastRow()+1);. I expected Google Forms to do the same.

After some testing and reading up I realized, that Google Forms somehow remembers where it inserted the last row into the answers Sheet and will insert the new submission before the data from other sources.

My question seems simple but I cannot find a solution: How can I ensure that Google Forms inserts the new submission at the very end, even if data has been entered through other means?

1 Answer 1

1

Google Forms and Google Sheets doesn't include any user managed setting to control how the forms submissions handled by the built-in "form link" are inserted to the spreadsheet.

One alternative to insert the form submissions at the end is to use one of the form submission triggers from Google Apps Script and the appendRow method from Class Sheet

NOTE: IMHO the best approach is to use a different sheet for each data source and a sheet to "blend" the data of all sources.

References

2
  • Hi Rubén - thanks for your answer! I guess the appendRow is the way to go then. Two followups: 1) If I create an onSubmit function for the Form, will it disable the default submission function? 2) How would I best replace the form-submission Trigger in the spreadsheet? Thank you!
    – dmeu
    Apr 26, 2020 at 7:53
  • Regarding 1) the answer is No, regarding 2, please post a new question.
    – Rubén
    Apr 26, 2020 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.