Clear all empty rows from a table

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

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.

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?

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).

2 Likes

I’ll echo what @Laurent_LEGRIGEOIS said …

For any table, having required fields is just a must. I mean, what is a task without a name? It seems to me that the display column should always be required, but perhaps there are cases I’m not considering.

TABLE VIEW

In table view, the (or all of the) required field(s) can then have some kind of red outline around the required cell if the row exists and that field is blank. Navigating away from the page seems to be a valid reason to just abandon all values in that row. Until then, it can stay red until filled out.

In addition, I’d like to recommend that any row that loses focus in which all columns are empty should just not exist. For instance, I have a “Status” table with only a single column. Obviously, a value should be required for that one column, but since that isn’t an option, I would think that if it’s empty (and thus 100% of the row fields has no value) that it would just be deleted.

DETAIL (LAYOUT) VIEW

In detail view, having an explicit “cancel” button seems appropriate in order to cancel all changes I’ve made for that particular record/row. Since I know you save all changes live, in my mind, this is just a compound “Undo” button that goes back X steps at once.

Likewise, if necessary, you could add a dummy “Save” button that is greyed out until all required fields are filled. When all requirements are met and the button is active, it does nothing … since you already updated the record as field changes were made.

I’m sure your devs will have better methods. That’s just how I think I might implement it using existing functionality.

1 Like

Is there a way to do resource allocation / utilization?

@Mohammad_Osama Welcome to the Coda Community!
Can you please create a new post for this topic?

Any news about this subject ?
Constraint on fields would be great, thanks