title: is there a way to force "Allow access" button popping up in google-app-script?
body: <p>i am working with google-app-script and use a script to fill an importrange inside a query statement into a table like this:</p>
  
  <pre><code>=QUERY(IMPORTRANGE("1xxxxxxxxxxxIDofTable";"Sheetname!A11:J1024");"select Col1,Col2 where Col6 contains 'filterterm'")
  </code></pre>
  
  <p>it seems like the allow access dialog just appears over the cell when the <code>IMPORTRANGE</code> statement is outside of the <code>QUERY</code> Statement, as also mentioned in the answer to <a href="https://stackoverflow.com/questions/38689320/how-to-resolve-error-with-query-importrange">this question</a>.</p>
  
  <p>but that seems to be only a workaround not a propper solution. Also because the problem does not appear to happen when the <code>IMPORTRANGE</code> is inside a <code>SORT</code> query like this:</p>
  
  <pre><code>=SORT(IMPORTRANGE("1RwI0T1tWf9XPn9WI5jrrWZ6dzheqG7u9Ry94teEQwHg";"Arbeitstabelle!A11:F1024");1;TRUE)
  </code></pre>
  
  <p>is this a bug or is there a reason for this behaviour? </p>
  
  <p>And foremost: </p>
  
  <p>Can I force the google-spreadsheet somehow to ask for Access permission once my script ran through?</p>