Delete Row Action - 2 diff behaviour

If the action is used to remove a row of data ( which is in between a list )

  • in the Google Sheets - it just clears the entry in the row but the row exists in the sheet ( Bug? )
  • in the Glide table - it does a hard delete of the row irrespective of the position of the row ( Expected )

I feel the behaviour in the Google sheets could lead to a lot of dummy lines or lines with null values over a period of time which would count towards the row count as well? Shouldn’t the behaviour be the same across both the backend?

-Shiv

I don’t believe this is a bug, but intended behaviour. I’m pretty sure there is a reason why it works this way, although I can’t find a reference to it at the moment (maybe a limitation of the Sheets API?).

Anyway, personally I never use the Glide Delete Row action. I have two separate approaches to deleting data, depending on the scenario.

  • Scenario 1 - Soft Delete
    • A soft delete is where I want the row hidden from the user, without actually deleting it.
    • In this case, I will have a date/time column labeled “Deleted At”, and when a user “deletes” the row I use an action to set that column to the current date/time.
    • I then use visibility conditions to hide that row
  • Scenario 2 - Hard Delete
    • For a hard delete (ie. actually remove the data), I have a boolean column labeled “Delete Me”
    • When a user “deletes” the row, I use an action to set that column to true, and a visibility condition to immediately hide it.
    • In the background, I have a time-based trigger that runs periodically and cleans out any rows in the GSheets that have been tagged for deletion.
3 Likes

Same here. Only difference is that I often use Integromat for the tidy up. The reason for the empty row in the Google sheet is a lack of support to “delete” a row in the Sheets API.

1 Like

This exact approach is what i had setup until i realised there is a 'Delete row" action available. And whilst trying it on phone i had both my sheets and glidetabble open on my system and i noticed this strange behavior.

And probably like what @V88 mentioned - might be because of lack of a proper support for delete functionality in the GSheets API.


But wont that affect the rowcount if there are large number of new entries and equal number of rows deleated in real world scenario?

In that way, l am liking the ability to start an app with Glide Tabel than sheets.

-Shiv

Glide doesn’t count empty rows, and as you can see, it ignores them and compresses all of the data together visually in the data editor.

Be careful with that, as it’s a one way street. Once you start an app with Glide Tables only, there is no way back. It’s not possible to add a Google Sheet at a later stage.

For this reason, it’s probably a good idea to always start an app with a single Google Sheet (at least for now), even if you don’t use it - just in case…

6 Likes

As a total beginner to the world of Glide apps - i will go with your word on that. Thanks Darren.

Thanks Jeff for the explanation.

-Shiv

2 Likes