Clear all empty rows from a table

#1

As a suggestion to Coda, I really wish you would not allow empty rows to be created - or at least not so easily. It seems this happens constantly and I’ll often find tables have somehow gained 10 new completely empty rows that were added unintentionally.

As a temporary work-around, I’ve created button to fix the problem, and wanted to share it with others. See the screenshot for a summary of the settings.

The important thing is that you select a single column that, when empty, represents an empty row. Here, a row in my to-do list is empty if there is nothing in the “Task” column.

If anyone knows how I might have one button address all tables, do share. Ideally, there would be a function that looks something like this:

=thisDocument.tables().rows().filter(thisRow.displayColumn.IsBlank())

Unfortunately, thisDocument seems to offer no functions that might allow you to navigate (folders/sections) or alter the document.

1 Like

#2

Hi @eightygrit - one option might be to create a button for every table that you create and then a master button to press al the buttons.

You could also have an automation that presses the master button daily - clearing rows automatically for you.

0 Likes

#3

And appreciate your feedback on rows being too easy to create. I agree with you. When you have a moment would you care to share what specific ways do you end up creating extra rows?

0 Likes

#4

Hi
Jumping in the discussion, I have the same issue.
I’ve created a button with “Open row for editing” enabled. I’d love to:

  • be able set some fields as mandatory (at least the visible ones) in the “open row for editing”
  • deactivate the (+) button in the table itself to prevent users to click it by mistake and create an empty row.

As a bonus, a mandatory cell wouldn’t allow to be left empty if edited by a user directly in the table (if it inherits the emptiness from a formula or another table it’s my problem to manage the case).

1 Like