Feature Highlight: Table Grouping

05/18/2017 Posted by Odalis

Tables are an excellent way to display information in your Knack apps.  Especially since they offer many features to further organize your data for easy understanding.

For example, let’s say you want to create a table that quickly shows which donors are making the most donations. So you start with a table that shows all donations:

2017-05-09_15-41-57

It’s not a bad start, but it’s not easy to tell who your best donors are. That’s where a feature like grouping can make all the difference.

Grouping allows you to group records by a common value in selected table columns. Here’s what your table will look like when it’s grouping the donations by donor:

2017-05-09_15-41-32

 

With a header row for each donor and their donations listed below them, you can see who’s in the giving spirit, at a glance.

Plus, since the “Amount” column was already totaled using a Row Summary, the grouping now shows the total per donor. Though there’s still a complete total for all donors at the bottom of the table:

2017-05-09_16-15-01

How to Add Grouping to a Table

Now that you’ve seen what grouping can do, here are the steps for adding it to your tables.

  1. In the Pages section of the builder, select the page that holds the table you want to add grouping to.
  1. Click on the table on that page to open the editor.
  1. Hover over the column you want to add grouping to and click the edit “pencil” icon to edit that column.
  1. Enable the grouping option by checking the “Grouping” box:

2017-05-09_15-43-05

Note: Any columns that are grouping records will automatically move to the front of the table. A small “group” icon will appear on that column to indicate it is grouping:

2017-05-09_15-47-30

For a quick video walkthrough of this process, see below: