A button that groups and ungroups a column


I would like to have a button above my table, that groups a column when pressed. When pressed again, it ungroups. Even more buttons, for easy grouping in different ways. Just to make it easier on my team.

And then, of course, filtering with the press of a button.

Is this possible…?

Yes, it’s possible!
But it does require a little knowledge of the formula.
And it depends on how far you want to go!
Here’s an example (not with buttons), but you can do it with buttons without worries.

Great! Thanks. I wish I could acquire that knowledge of the formula somewhere. I searched, but to no avail…

You can help yourself, for example, with this resource from Coda Trick:

Hey @Math_24 ,

I am not aware of a method to accomplish grouping with a formula (in a button or otherwise) - but I would love to know more about this magic CFL.

Referencing to a one hour video (and I didn’t find anything about grouping in this video, but I may have overlooked it) is not going to help someone who doesn’t exactly know what she/he is looking for.

Your screenprint suggests that you are doing this, so I hope you can share a sample doc or at least some sample code showing how this is done.

Thanks in advance,
Greetings, Joost


Hey No problem :wink:
i share little exemple :slight_smile:


Wow, that’s exactly what I was thinking of! Thanks a lot.
I am not sure if I can ever understand how that works, tho. I am studying hard here…

Thanks for the little example @Math_24, very useful.

@Erik_van_Schaaik, here’s my discovery. In the table, there’s a formula column called Group. Depending on the select control on what to group by, it will copy the values in that selected column name to column ‘Group’.

The table itself is set to group by the column ‘Group’.

A quick way to see how the formula works is to remove the group setting in the table and cycle through the control values. You will see the values change in the Group column.

I hope this helps a little!

Hello @Math_24 ,
Thank you for sharing this - it is a very smart use of a calculation with a switch or switchif. If we could only hide a column with a formula - we could make it look just a little bit ‘cleaner’.
You can do a similar thing with sorting, but with sorting you can hide the sort column and it still works. Whit your grouping option, you show either a blank grouping column, or you duplicate data from another column. But for the makers that need this, it is a very nice find.


thank you for explaining it yes I should have made a short video but my oral english is not great
I update doc for explain solution.


yes, we can use the same principle for sorting.

on the image I’ve even added a checkbox that lets you filter status directly to make them visible or not.
The idea is to have a “flow” table linked to the connected user. Using a formula, you can retrieve the current flow and dynamically filter the doc :slight_smile:


1 Like

Hi all,

Thank you all very much!

Indeed, my thoughts were the same: If we could only hide a column with a formula.

Also, I created a button for filtering, a year or two ago. But since Coda updated, and renamed functions such as ‘lookup’ into ‘relation’, I keep having a hard time finding my way. I find it is getting harder instead of easier. :frowning:

But I am happy to see that a lot of wonderful stuff is still possible, ‘with a little help of my friends’.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.