I have a form for timesheet, that each row is a different job description, job number, hours booked to job etc.

I have it so when you submit, it fills in the response sheet in order from top to bottom.

Problem I have is I want to run some functions set by a trigger that sends a copy of the sheet, then deletes the data and resets it so the new responses start at the top, but I only want this trigger to run after all the response lines are filled. So basically I use submit to send each response, but I have several responses to input before this can happen.

Is there a script that lets the response sheet rows be filled with the data as if submitted, but won't run the trigger until the final submition? If this makes sense.


1 Answer 1


How to make out when the final response is received? Do you want to get exactly xx responses to trigger the event? Forms does not work like this.

It will much better if you can have a column with header "Updated". You can set up a trigger "on form submit" which will run when you receive a row. You can do whatever you want (like taking the values to a new sheet etc) and you can update the "updated" column with the date and time

function onFormSumbit(e) {

var item1 = e.source.getActiveSheet().getRange(e.range.rowStart,1).getValue();

var item2 = e.source.getActiveSheet().getRange(e.range.rowStart,2).getValue();

var item3 = e.source.getActiveSheet().getRange(e.range.rowStart,3).getValue();

//now do whatever you want (like populating a new sheet, send email etc)

//update a column in the sheet with today - mark it is processed. 


  • Ah that makes sense, I'll try it out thanks
    – Peteh
    Jul 2, 2019 at 7:17

Your Answer

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

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