Button groups in table

The suggested feature is to have a way to group multiple button columns in a table. There are a few ways this could be achieved. One would be to have a formula to Group buttons which would accept n Button formulae as arguments, and then render the result as a group of buttons in the column. The other could be to have some UX where you could multi-select multiple button-type columns in the table, and then press to group them. Even better would be to support both options (where the UX is path ends up creating a single column implemented with some ButtonGroup() formula) under the hood, with support for breaking up the group back into the original columns.

I would imagine the UI for the grouped buttons would be some dropdown which pops open a menu with the buttons collected as a list.

This would be especially useful for tables where the main intent is to continuously make small or incremental updates to the values, e.g. updating a remaining effort column, or changing the status, or hidding, or notifying assignee, etc. These actions tend to clutter the table, and often fall into one or more logical groups of actions.

Nice to have features would be the ability to set a primary button for the group which would show up with a caret beside it for the dropdown for other buttons. Or the ability to set the icon for the group itself.


Hi! You can watch the trick in this video

How its works in brief:
In order to insert several buttons into one column
it is necessary to convert button into a text format
To do this, you create a new text column that refers to the button and write the following formula:

button(thisRow.[columnbutton], "textbutton")

columnbutton - is the column of button
textbutton - the text of the button

we can customize the color of the button, the icon after textbutton must be carefully
the color “blue”, “green”, “red” and so on.
do not make a mistake, because if you write the wrong color, the document might crash and only a rollback of the document history will restore the data
Also for safety manipulations it is worth removing the closing symbol
Then in the column where we want to combine several buttons, use the formula

1 Like

This is a really useful suggestion @loucadufault! I pay a lot of attention to the UI of the docs I build for customers and sometimes having each button in a column is overwhelming and makes the interface too wide.

Sometimes I’ve solved this by creating what I call “Dynamic buttons” in which I use SwitchIf() to change both the label and the action the button performs based on other parameters of the row (such as status).

On the other hand… I’d never thought of @Evgeniy_Mamontov’s approach! It makes total sense (bearing in mind that Button() is a hidden formula and it has its risks). I thought it could be used in a table with the “Wrap Text” activated and it’ll look great.

Built a quick demo doc for you to play around. Thanks @Evgeniy_Mamontov for the idea!

1 Like

Cool suggestions! I should have made it clearer in the post this is more of a suggestion to the product team for a feature that should be accessible to users, rather than an immediate need of my own. But it is good to know that there are workarounds that somewhat accomplish this already.

I have been testing different solutions and it should be noted that some workarounds or undocumented functions (like button()) will in particular on mobile not always give you the expected results. Since Coda is accessible on mobile devices it is just a matter of time before some of your users will encounter the exceptions.

Can you explain? What on mobile and in what context did you find button() did not perform as expected?

There can be two different kinds of default table display on mobile - card style or table style. For many tables card style is standard, but you can manipulate it to some extend by changing the display column (although sometimes that will brake existing formulas). If the default is card mode, the button() function doesn’t work, not even when sliding the card to the right, which normally shows the buttons.

You have to actually open a modal (with the buttons visible) or to to table mode (pushing the little table icon first) in order to use these types of buttons.

For us, sliding the card and seeing the first two buttons of the row or pressing more and seeing all the buttons was very handy, but doesn’t work for button() buttons. And in the card view they show as ‘model’ , which is not very intuitive.