Table
Show records in a grid, with optional inline editing, column totals, transpose and record squashing.
A table widget shows records from a data object as a grid on the canvas. It's the most capable widget: pick columns, total them, let viewers edit inline, transpose it, and merge records. For the shared editor mechanics, see Build a canvas.
Two kinds of table
When you make a new widget, the type picker offers Default table and Lookthrough table side by side. In an existing table's panel, a pair of tabs at the top switches between them:
- Default table, a flat grid of records, which is what the rest of this page describes.
- Lookthrough table, whose rows open into the records beneath them, level by level. See Lookthrough.
The two keep their own configuration, so switching back and forth while you decide costs you nothing.
Choose the data and columns
The Data panel has:
- Data source: the object the table reads from.
- Load from a view: a switch that, once on, offers Import from view to copy a saved view's columns, filters and sort onto the table. They are copied, so a later change to the view does not reach the canvas, and you can keep editing them here. Columns the view borrows from another object come with it.
- Columns: the attributes to show. The picker is the same one used on data views, so you can reach across a relationship to show an attribute from a linked object as a column. See Manage data views. The preview shows each column as you pick it.
- Column order: drag the selected columns into the order you want.
- Column calculation: add a per-column total shown under the table. The menu lists the picked columns; each opens a Calculate list with None and the aggregations that fit its type: Count Filled, Count Empty, Count Distinct, Sum, Average, Min and Max. The button then counts them, for example 2 calculations done.
Until you give it a title, a table is named after its data source.
Filter, sort and allow editing
The Filters, sorting & selection panel has the usual Filters and Sort by builder, plus a Record editing switch.
Turn Record editing on (Let viewers select and edit records in view mode) to let viewers select and edit records straight from the canvas in view mode. The table then always shows a checkbox on each row, with a select-all in its header, and a pen to edit a row on hover; while a row is edited, Cancel and Apply take their place. Leave it off (the default) and the table is read-only.
With rows ticked, the table's header counts them, and Edit records and Squash join the controls in the card's ⋯.
Sort from a column header while viewing
Viewers can reorder a table without editing the canvas. While viewing a canvas, click a table widget's column header to sort by it, and click again to cycle through ascending, descending and back to the widget's own order. The table returns to its first page, since re-sorting reshuffles the whole record set.
This is a shortcut for reading, and it lasts only for your session: it does not touch the widget's saved sort and nobody else sees it. To change the sort the widget actually stores, edit the canvas and use Sort by in the panel. Picking a sort from the table's Sort control replaces a header sort.
Display options
The Display panel has two switches:
- Transpose swaps rows and columns (Best for tables with only a few records), so each attribute becomes a row and each record becomes a column, which reads well for a handful of records shown side by side. A transposed table is read-only: Record editing and Column calculation are unavailable while it's on, and Transpose is greyed out while either of them is set.
- Auto-fit height of canvas, on for a new table, makes the card take the height its rows need rather than the grid rows you drew, up to a maximum past which it scrolls. See Build a canvas.
A table keeps its column names in view as you scroll its rows.
Squash and unsquash records
When Record editing is on, viewers can merge and split records directly from the table in view mode.
- Squash appears once two or more records are selected. It merges the selected records into one; the originals are deleted. A confirmation dialog previews, per attribute, the Resulting value and any Lost values, and asks you to acknowledge that some values will be lost before you confirm. Formula attributes are recalculated afterward. This can't be undone.
- Unsquash appears when exactly one record is selected. It splits that record into two, with arrows to move multi-value items between the two child records.
Squashing permanently deletes the records it merges, so it's best used to deduplicate. Review the Lost values column in the dialog before confirming.
Paging through records
The table pages its rows. The Rows per page selector is available in edit mode only; in view mode the footer shows the rows on screen, the page and the page count, and the paging arrows appear when you hover the widget. Rows show as soon as they are read, and the total follows a moment later, so on a large table the count may show a placeholder briefly. When you Expand the table from its menu, the expanded view pages through 25 rows at a time independently of the card.
Export
From the table's ⋯ menu you can export the displayed rows as a CSV (Export chart) or the table as a PNG (Export card), and Expand it to a large modal. See Build a canvas.