Deleting rows at a specific time

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

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

please can you teach me

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!

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.

1 Like

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

*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

1 Like

Thank you Roberto_Salim.

1 Like

This is in Spanish?

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.

Português / Brasil ^^

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.

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

1 Like

@Roberto_Salim please can you explain more

Hello @Glider

what exactly?
about deleting beautiful lines with checkbox?

or delete comments from the chat?

1 Like

Both

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

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:

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

create time based schedule

@Roberto_Salim the third diagram is in another language

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

2 Likes