Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

Pasting to multiple cells is not triggered if in a filter view

$
0
0

The following Google Apps Script works fine when viewing the spreadsheet normally:

function notify(edit){  const sheet = edit.source.getActiveSheet()  const sheetName = edit.source.getActiveSheet().getName()  const column = edit.range.getColumn()  const row = edit.range.getRow()  const rows = edit.range.getNumRows()  const value = edit.range.getValue()  if (sheetName === 'Bugs'&& column === 33 && value === true)  {    for(var i = 0; i < rows; i ++)    {      webhook(sheet.getRange(row + i, 34).getValue(), sheet.getRange(row + i, 35).getValue())      Utilities.sleep(2000)    }  }}function webhook(post, message){  UrlFetchApp.fetch(`https://discord.com/api/webhooks/1235813427104976916/XXX?thread_id=${post}`, {headers: {'Content-Type': 'application/json'}, method: 'POST', payload: JSON.stringify({content: message})})}

It successfully triggers the webhook function several times when I paste TRUE in multiple cells at once.

However, if I enter a filter view, it only triggers once for one cell. Why is that?


Viewing all articles
Browse latest Browse all 9782

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>