Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8679309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:56:23+00:00 2026-06-12T20:56:23+00:00

I have a Google Apps Script trigger set up to check for form submissions.

  • 0

I have a Google Apps Script trigger set up to check for form submissions. However, I would like to check the incoming event values and determine whether the event should actually be added to the spreadsheet or ignored.

Right now I’m doing something like below to remove the last row after its added.

function onFormSubmit(e) {
    var sheet = SpreadsheetApp.getActiveSheet();
    if (e.values[2] < whatever) {
        sheet.deleteRow(sheet.getLastRow());
}

However this approach sometimes fails, I assume because of concurrent events.

Is there a better way to do this ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:56:24+00:00Added an answer on June 12, 2026 at 8:56 pm

    How quickly do you need the rows removed? Would it be viable to use a time-driven trigger to clean up the sheet periodically?

    Or, using the form submission trigger, you could clear (rather than delete) the rows using e.range, and then use a time-driven trigger to clean out the blank rows.

    Or, using the form submission trigger, you could opt to not touch the raw data submissions, but use another sheet (or spreadsheet) to log the accepted e.values using appendRow(), which appends atomically, getting around the concurrency issue.

    Or, you could achieve the same by using a FILTER or QUERY formula in another sheet, but this would probably have the biggest hit on performance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a form in Google Apps Script and embedded it into Google
I would like to add a fileupload to my Google Apps Script App. In
I have a simple Google Apps Script ContentService that emits a string like Hello
I have created a UI App Form Panel in Google Apps Script with the
I have a Google Apps script which replaces placeholders in a copy of a
I have 2 html documents inside my google apps script project (showHtml1, showHtml2). I
I have been playing around with Google Apps Script today and I am trying
I have read some of the basic Google Apps Script documentation/tutorials. I have not
I have now written a number of different functions in Google Apps Script that
I have built an object in Javascript on the Google Apps Script engine and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.