# Deleting rows at a specific time

**URL:** https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282
**Category:** Ask for Help
**Created:** [June 22, 2020, 8:46pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282 "2020-06-22T20:46:41Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)
#### Post date: [June 22, 2020, 8:46pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/1 "2020-06-22T20:46:41Z")

</div>

Is it possible that a row will be deleted after a certain times or it can be deleted with a checkbox

---

<div class="post-metadata">

### Author: ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)
#### Post date: [June 22, 2020, 9:01pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/2 "2020-06-22T21:01:21Z")

</div>

Yes;

I have two apps that do this by script, one is scheduled by the hour, the other is a checkbox with a change trigger on the spreadsheet, I deleted the line, if there is another way I don’t know

---

<div class="post-metadata">

### Author: ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)
#### Post date: [June 22, 2020, 9:02pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/3 "2020-06-22T21:02:44Z")

</div>

> please can you teach me

---

<div class="post-metadata">

### Author: ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)
#### Post date: [June 22, 2020, 9:06pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/4 "2020-06-22T21:06:38Z")

</div>

You can’t exactly delete a row with a checkbox…though it can be used to hide/show rows.You can, however, delete rows using the “pen”. But this would depend on how you are setting up everything. For example, you ask visitors to sign up to access your app/other tabs. The visitor takes up a row. This the visitor can edit/delete, provided edit/delete is not conditional on access level being say “editor”, if you are using User Profile. You don’t need User Profile for this though. There are other ways round this. But sticking to User Profile for now, If that editor is set as admin not visitor then visitor would not be able to delete the row on which the visitor sits.

On the Q of auto row deletion after a certain period, you would need a script for that. There are loads of topics on how to delete after a certain period. Some have helpfully shared the script with us too.

Thank you!

---

<div class="post-metadata">

### Author: ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)
#### Post date: [June 22, 2020, 9:08pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/5 "2020-06-22T21:08:45Z")

</div>

In fact Roberto\_Salim is the person who shared his script with us as recently as a few days/weeks ago. He is your person.

---

<div class="post-metadata">

### Author: ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)
#### Post date: [June 22, 2020, 9:26pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/6 "2020-06-22T21:26:14Z")

</div>

Yes @ Wiz.Wazeer, although it didn’t help, I posted the script below that I use with the time trigger

> [@Chat messages are deleted in a certain time](https://community.glideapps.com/t/chat-messages-are-deleted-in-a-certain-time/11162/2):
>
> Hello, I don’t know if I’m the right person to present you with a solution, you’ll most certainly find it here. I am also looking for something similar, what came to my mind was to create a script that erases the lines, and you schedule it to fire at 00hs. This is the code, if you’re wrong, colleagues will correct it. function dell() { var spreadsheet = SpreadsheetApp.getActive().getSheetByName(“App: Comments”); //tab name to be deleted spreadsheet.getRange(‘A:F’).activate(); //delete from…

\*As Wiz Wazzer emncioned, also enable to use the pen and delete lines …  
And this is my suggestion with the checkbox, program the trigger based on change in the spreadsheet, that when checking the checkbox of it the specific line

 ![Capturar](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/3/32646baf9dd6537150cf460feca3e45be6fdc2d2.png)

---

<div class="post-metadata">

### Author: ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)
#### Post date: [June 22, 2020, 9:28pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/7 "2020-06-22T21:28:12Z")

</div>

Thank you Roberto\_Salim.

---

<div class="post-metadata">

### Author: ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)
#### Post date: [June 22, 2020, 9:29pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/8 "2020-06-22T21:29:34Z")

</div>

This is in Spanish?

---

<div class="post-metadata">

### Author: ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)
#### Post date: [June 22, 2020, 9:31pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/9 "2020-06-22T21:31:57Z")

</div>

Hello, I don’t know if I’m the right person to present you with a solution, you’ll most certainly find it here.

I am also looking for something similar, what came to my mind was to create a script that erases the lines, and you schedule it to fire at 00hs.

This is the code, if you’re wrong, colleagues will correct it.

**function dell() {  
var spreadsheet = SpreadsheetApp.getActive().getSheetByName(“App: Comments”); //tab name to be deleted  
spreadsheet.getRange(‘A:F’).activate(); //delete from column A: F  
spreadsheet.getActiveRangeList().clear({contentsOnly: true, skipFilteredRows: true});  
};**

I think this one is for deleting comments? I pulled it from one of your threads.

---

<div class="post-metadata">

### Author: ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)
#### Post date: [June 22, 2020, 9:32pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/10 "2020-06-22T21:32:41Z")

</div>

Português / Brasil ^^

---

<div class="post-metadata">

### Author: ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)
#### Post date: [June 22, 2020, 9:39pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/11 "2020-06-22T21:39:08Z")

</div>

When you are using Glide’s default chat, you need to do it in the editor or sheet (or this might help, though i have not tested it). When using the chat apps we create, you can delete in-app. They get deleted in the sheet too.

---

<div class="post-metadata">

### Author: ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)
#### Post date: [June 22, 2020, 9:44pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/12 "2020-06-22T21:44:37Z")

</div>

Yes, I thought that just deleting the spreadsheet would disappear from the app, but it looks like it has to be deleted in the glide. For a moment, I didn’t know that "/

thanks for the guidance

---

<div class="post-metadata">

### Author: ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)
#### Post date: [June 25, 2020, 7:44pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/13 "2020-06-25T19:44:28Z")

</div>

@Roberto_Salim please can you explain more

---

<div class="post-metadata">

### Author: ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)
#### Post date: [June 25, 2020, 9:52pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/14 "2020-06-25T21:52:19Z")

</div>

Hello @Glider

what exactly?  
about deleting beautiful lines with checkbox?

> [@Roberto\_Salim](#):
>
> E esta é a minha sugestão com a caixa de seleção, programe o gatilho com base nas alterações na planilha, que ao marcar a caixa de seleção, a linha específica

or delete comments from the chat?

---

<div class="post-metadata">

### Author: ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)
#### Post date: [June 25, 2020, 10:04pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/15 "2020-06-25T22:04:10Z")

</div>

Both

---

<div class="post-metadata">

### Author: ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)
#### Post date: [June 25, 2020, 10:05pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/16 "2020-06-25T22:05:02Z")

</div>

And also @Roberto_Salim what do you mean by pen  
I do jot know of that

---

<div class="post-metadata">

### Author: ![Roberto\_Salim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/roberto_salim/32/6861_2.png) [@Roberto\_Salim](https://community.glideapps.com/u/Roberto_Salim)
#### Post date: [June 25, 2020, 11:37pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/17 "2020-06-25T23:37:05Z")

</div>

Okay, in relation to the pencil commented by Wiz.Wazeer, it will not serve you because you want to delete based on time, enabling the pencil to delete by the app is done manually:

 ![dell](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/9/9830d3dcb9cc85c728de8d6e9009241426e11bb0.png)

About the script suggestion I talked about, did you get to test it? there was an error … I need to know exactly which process you stopped.

create the script referencing the tab

 ![script 2](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/a/a45b715578bc3920484190169f312eb8193cd46a.png)

create time based schedule

 ![script](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/6/66305db15102b40d19c72a9ad109fb7de90e6e69.png)

---

<div class="post-metadata">

### Author: ![Glider](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/glider/32/9699_2.png) [@Glider](https://community.glideapps.com/u/Glider)
#### Post date: [June 26, 2020, 8:21am UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/18 "2020-06-26T08:21:56Z")

</div>

@Roberto_Salim the third diagram is in another language

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [June 29, 2020, 11:13pm UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/19 "2020-06-29T23:13:32Z")

</div>

@Glider Just did a quick translation with google translate and duplicated the same screen with one of my script triggers. Does that help?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/1/15ca637e2115eb1f84737f8006e9c2ec7ae08f0a.png)

---

<div class="post-metadata">

### Author: ![nadiernad](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/nadiernad/32/31563_2.png) [@nadiernad](https://community.glideapps.com/u/nadiernad)
#### Post date: [March 13, 2022, 6:53am UTC](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282/20 "2022-03-13T06:53:50Z")

</div>

can you show me the code of this script? where can i get it can you show me the code

[Next page](https://community.glideapps.com/t/deleting-rows-at-a-specific-time/11282.md?page=2)
