Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
Tags used for linking issues. [ID: 1172495]
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Once you remove the filter, the row can be deleted.
There is no error. This is causing some unwanted issues when we need to update sheets. There is no way to stop users from using a filter, so we cannot check if the row is actually deleted.
Please provide a small sample script that reliably reproduces the issue.
The sample should run as-is or with minimal setup, without external
dependencies.
Spreadsheet and script:
Sample code:
function myFunction() {
var rowToDelete = 8;
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("test");
sheet.deleteRow(rowToDelete) //not working if row is filtered out
sheet.deleteRows(rowToDelete,1); // not working if row is filtered out
}
What steps will reproduce the problem?
1. Use a filter so a row will be 'hidden' (in demo, only select 'b' for column b)
2. Try to delete a row that is filtered out (in demo, row 8, which has 'a' in column b)
3. Row is not deleted.
What is the expected output? What do you see instead?
I expect the row to be gone, but it is not.
What is the project key (found under "File > Project properties")? The
project key does not give the Apps Script team access to your source
code or data. We use it to look up debug information about your script.
Mx9DgfEr1qTNSX_Y-egAP_aTM8kX7Oxcl
Please provide any additional information below.
To subsequent readers: If you are also experiencing this issue, please
click the star next to the issue number. We prioritize issues with the
most stars.