title: Problem with function triggered by OnFormSubmit when multiple are submited at once to spreadsheet
body: <p>I have a Google Script function that works as expected however when receiving many form submissions at once I run into a problem when the data is copied.</p>
  
  <p>If data comes in fast enough the wrong information may be copied to the other sheet.</p>
  
  <p>Here is an example set. I submitted 4 form's at once and the data came in just fine.
  <a href="https://i.stack.imgur.com/9vyt2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9vyt2.png" alt="enter image description here"></a></p>
  
  <p>However when the scrip ran that was triggered by the <code>OnFormSubmit</code> it managed to copy one of the rows of data twice overwriting another.</p>
  
  <p>As you can see below the data <code>4</code> and <code>44</code> were coppied over twice and is missing the <code>2</code> and <code>22</code> data. </p>
  
  <p><a href="https://i.stack.imgur.com/385ZC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/385ZC.png" alt="enter image description here"></a></p>
  
  <p>So with that my question is this:</p>
  
  <p>Is there a way to prevent this kind of duplication of information. Some way to Q up the function if one is already running?</p>
  
  <p>Here is the code:</p>
  
  <pre><code>function Auto_move_form_data() {
    var form_name = "Form Responses 1";
    var open_name = "OPEN";
  
    var workbook = SpreadsheetApp.getActiveSpreadsheet();
    var form_ws = workbook.getSheetByName(form_name);
    var open_ws = workbook.getSheetByName(open_name);
  
    var form_last_row = form_ws.getLastRow()
    var open_last_row = open_ws.getLastRow()
  
    form_ws.getRange(form_last_row,2).copyTo(open_ws.getRange(open_last_row+1,1), {contentsOnly:true});
    form_ws.getRange(form_last_row,3).copyTo(open_ws.getRange(open_last_row+1,3), {contentsOnly:true});
  
  }
  </code></pre>