title: Refresh filters when new data comes in
body: <p>I have a Google Spreadsheet with multiple sheets. We paste a table of data into sheet1 and all the other sheets have filters based basically on the 'membernumber' value in one of the columns (so that the mass data that gets imported gets sorted by our individual members). We then want to send an email with an updated table for each individual member (so therefore my script will access each individual sheet and copy the filtered table of data to the email message body). </p>
  
  <p>But my question is for one of the early parts of this script: How can I make my Apps Script automatically refresh the filters in all of our sheets after we've imported the new data in sheet1? Right now we go manually and click the filter icon and re-select the member's number, or 0 if they don't have data for that day. It's killing me. </p>
  
  <p>I know apps script doesn't have an AutoFilter method, but maybe with the Sheet API I can refresh them? <a href="https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#updatefilterviewrequest" rel="nofollow noreferrer">I think this may be the method I need to call</a>.</p>
  
  <p>Let's say I have a sheet, would I just write:</p>
  
  <pre><code>var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("example");
  sheet.updateFilterView({"fields": *}); //since I want to update all filters, all fields on each sheet 
  </code></pre>
  
  <p>I really wish the Google sheets API had some examples! </p>