title: Trying to consolidate Forms into a Sheet
body: <p>I'm trying to build an apps script that will take a whole bunch of forms and consolidate their answers onto one spreadsheet. I don't need all of the answers, just the ones to Yes/No questions, and it doesn't really matter what format those yes/no answers come into the spreadsheet as as long as I know which is for yes and which is for no.</p>
  <p>I've written the below, with the first half collecting the answers, and then the second half is my attempt to get those answers into the spreadsheet. As far as I can tell, I'm not sure if I don't understand how the Forms work or if I don't understand how the sheet is working - any guidance would be much appreciated!</p>
  <pre><code>const auditReportConsol = () =&gt; {
    const folder = DriveApp.getFolderById('1Y2QgLbHncLzPDe-UCD6WizSNnHkjkt4z');
  
    const forms = folder.getFilesByType(MimeType.GOOGLE_FORMS);
  
    while (forms.hasNext()) {
      const file = forms.next();
      const form = FormApp.openById(file.getId());
      var formResponses = form.getResponses();
        for (var i = 0; i &lt; formResponses.length; i++) {
        var formResponse = formResponses[i];
        var itemResponses = formResponse.getItemResponses();
  
       switch (itemResponses[i].getItem().getIndex()) {
          case 7:
           var gov1 = itemResponses[i].getResponse();
            break;
          case 9:
           var gov2 = itemResponses[i].getResponse();
           break;
          case 11:
            var gov3 = itemResponses[i].getResponse();
            break;
          case 13:
            var gov4 = itemResponses[i].getResponse();
            break;
          case 15:
            var risk1 = itemResponses[i].getResponse();
            break;
          case 17:
            var risk2 = itemResponses[i].getResponse();
            break;
          case 19:
            var risk3 = itemResponses[i].getResponse();
            break;
          case 21:
            var risk4 = itemResponses[i].getResponse();
            break;
          case 23:
            var risk5 = itemResponses[i].getResponse();
            break;
         case 25:
            var risk6 = itemResponses[i].getResponse();
            break;
          case 27:
            var breach1 = itemResponses[i].getResponse();
            break; 
          case 29:
            var breach2 = itemResponses[i].getResponse();
            break; 
          case 31:
            var breach3 = itemResponses[i].getResponse();
            break; 
          case 33:
            var asset1 = itemResponses[i].getResponse();
            break; 
          case 35:
            var asset2 = itemResponses[i].getResponse();
            break; 
          case 37:
            var asset3 = itemResponses[i].getResponse();
            break;
          case 39:
            var asset4 = itemResponses[i].getResponse();
            break; 
          case 41:
            var asset5 = itemResponses[i].getResponse();
            break; 
          case 43:
            var dsr1 = itemResponses[i].getResponse();
            break; 
          case 45:
            var dsr2 = itemResponses[i].getResponse();
            break; 
          case 47:
            var dsr3 = itemResponses[i].getResponse();
            break; 
          case 49:
            var dsr4 = itemResponses[i].getResponse();
            break; 
          case 51:
            var dsr5 = itemResponses[i].getResponse();
            break; 
          case 53:
            var dsr6 = itemResponses[i].getResponse();
            break;
          case 55:
            var dsr7 = itemResponses[i].getResponse();
            break;
          case 57:
            var dsr8 = itemResponses[i].getResponse();
            break;
          case 59:
            var dsr9 = itemResponses[i].getResponse();
            break;
          case 61:
            var access1 = itemResponses[i].getResponse();
            break;
          case 63:
            var access2 = itemResponses[i].getResponse();
            break;
          case 65:
            var access3 = itemResponses[i].getResponse();
            break;
          case 67:
            var change1 = itemResponses[i].getResponse();
            break;
          case 69:
            var change2 = itemResponses[i].getResponse();
            break;
          }
          Logger.log;
          Logger.getLog;
  
        }     
      }
      var ss = SpreadsheetApp.openById('1Qlv4v5dU6caBnRfa4Z58OBnoT0g3uFEmKewTENsBOLo');
      var sheet = ss.getActiveSheet();
      var newForm = sheet.appendRow([gov1],[gov2],[gov3]);
  
  }
  </code></pre>