Control cells

Designed to give more power to your audience

Introduction

The Count canvas is built for more than just static reports. Adding controls to your canvas transforms them into interactive reports and documents.

What are control cells?

Controls are special cells that enable readers to interact with a shared canvas. Each control produces a table of one or more values that your readers can edit, that can be referenced just like any other cell.

You can create the following types of interactive controls:

How to add a control cell

Use the canvas toolbar to insert control cells:

Control cells can be used in three ways

  • Connecting them to upstream sources to affect all downstream cells

  • Connecting them to cell directly

  • As SQL values to inject into queries via Jinja

There are a few things to know about control cells in order to connect them to your queries:

Connecting them to upstream sources

Creating a filter globally

You can quickly apply a control cell as a filter across multiple cells and complex canvases, by attaching to a cell or database table as a global filter. This constraint will then apply to all further visual/table (low-code) cells that depends on it as a source.

As well as effecting the entire canvas, this can be scoped to one more more specific frames.

Control cells that are set as a global filter, can also be used simultaneously as an individual filter or SQL value as described below.

Connecting them to cells

When adding a filter to a table or visual, it can be connected to a control.

You will then be able to select the control cell by name, and set the conditions for the filter, with the filtering value being provided dynamically by the control.

Note. Only control cells within the same database source, and of a compatable type can be attached this way. For example a Number Input control cell can only be attached to numeric columns where it allows exact matching and inequality conditions. A Toggle control cell can only act upon boolean-type columns etc.

As SQL values injected into queries via Jinja

Control cells have one column called value that contains the current value of the control cell. When referred to as tables, this column can be referenced in SQL. When referred to using Jinja, the value of the control cell is exposed directly.

Reference control cells using their name

As control cells are just tables, you can add them into your WHERE statements to filter values, into the logic of a new column, or any other way you can think of!

You can either refer to control cells using pure SQL, or using Jinja templates.

Users of Redshift may encounter errors when referencing control cells using SQL - see this limitation and workaround.

Customize control cell appearance

When you think about how you want others to interact with control cells, you can customize:

  • the title (or prompt) the user sees

  • where the control cell is located

  • the options available

  • the default values selected

  • the font and format of the control

Allow users to change control cells

Control cells will behave differently depending on whether a user has edit or view access to a canvas, and whether the canvas is locked or unlocked.

The table below summarizes how these two states interact:

🔐 / Access
Canvas Editor
Canvas Viewer

Unlocked canvas

✅ Can edit control cells 👁 Edits are visible to everyone

❌ Cannot edit control cells 👁 Can see edits to control cells made by editors

Locked canvas

✅ Can edit control cells 🙈 Can only see their own edits

✅ Can edit control cells 🙈 Can only see their own edits

In summary, if you want a canvas to act like a typical dashboard or notebook where many users are using filters independently then make sure you lock the canvas, but if you intend to use the canvas as a collaborative space, then keep the canvas unlocked and invite contributors to be editors.

Read more about how locking affects canvases here:

Real-time collaboration

Last updated