Skip to main content
Canvas control basics

Learn about the basics of the control building block, including control types and adding controls to the canvas of your doc

Updated over 10 months ago

Controls— like buttons, select lists, and sliders— make your doc easier to interact with and more intuitive for your team. When you add them to the canvas of your doc, you’re able to define how and where others interact with your doc, and create safeguards so your teammates can view or modify data without fear of breaking a table. Read on to learn about control types, creating controls, and some uses of controls.

ℹ️ If you want to learn about filtering tables and views with controls, we recommend jumping straight to this article.

The beginning of this video covers buttons, so skip to 2:37 to learn more about controls.

Within this article you’ll find...


Types of controls

For those familiar with programming, you can use controls as the front-end interaction points and tables as the back-end databases - to make your doc more like an app for your team. This means that control types line up to column types. Just as you can have a text or select list or relation column, you can also have a text or select list or relation control. There’s a control for almost all column types (with the exception of columns like image, attachment, link, etc.).

Some of the most popular control types are...

  • Text - similar to a search bar; check out this community post

  • Select - select a single item from a pre-set list of text values; check out the example in this video

  • Multiple select - select one or more items from a list of text values

  • Relation - select row(s) from a specified table in the doc; learn more about relations here

  • Scale - a type of discrete numeric control; set the range and choose the icons

  • Checkbox - a boolean control; for instance, filter a table differently based on whether the checkbox is checked or unchecked

  • Date range - a pre-built selection of date ranges, including past, present, and future options; another great way to filter a table

To browse all of the available control types, just type /control into a blank line in your doc. You’ll then see a list of all possible control types. To get a full sense of how each control type works, add them to your doc and play around!

Personal vs. collaborative

For each control you create - no matter the type - you can also choose to make it either a personal control or a collaborative control.

  • Personal controls apply only to the individual user. So if a user makes a change to a person control, it only affects their view and does not affect other collaborators in the doc.

  • Collaborative controls are shared by all users in a doc. Any change made to the control will be seen by everyone in the doc.

Note: Newly created controls will always be personal by default.

1_1 (19).png

Create a control

To create a control, you can either start directly in the canvas or from a table.

In the canvas

  1. On a new line in your doc, type /control

  2. You’ll see a dropdown list with all the different control types. Choose your desired type.

  3. Choose whether the control will be personal or collaborative (see section above for details on this)

  4. Give the control a name (this lets you easily reference the control from other places in your doc such as formulas and table filters)

  5. Depending on the control type, there may be other fields to fill in. Complete those fields as needed

Once completed, simply hit Enter on your keyboard to close out of the settings panel. If you need to revisit these settings, just right-click on the control.

create new control via canvas.gif

If you want your control to filter your table or view, you can alternatively create the control from within the filter builder for the table. Learn all about creating controls for filtering here.

Set a starting value

At the bottom of your control settings, you have the option to set a Starting Value. This field allows you to specify the initial value that is populated until you choose to modify it. Note that this field is only available for personal controls.

For example, in the example control below, “Active” is the value that everyone will see if they haven’t modified the control value. Also, any buttons with the Reset control value action will revert it back to “Active.”

set starting value for control.gif

Utilize controls

Once you’ve set up your control, you can use your control in a number of ways.

For starters, you can reference that control’s value anywhere that you can write a formula. Just type the control’s name into the formula builder. If you want to check whether a control contains a certain value, be sure to use the Matches() formula. This makes it possible to match exact values, lists, and ranges.

reference control in formula.gif

Perhaps the most common use of controls is filtering tables and views. We have an entire article dedicated just to this application, so check it out here.

But like most Coda building blocks, controls can be used in all kinds of creative ways. For instance, this video shows how to use controls to dynamically generate paragraphs based on control values. Similarly, this video walks through five different ways to populate text using controls. So feel free start playing around and see what you can build!

FAQs

How can I learn more about using controls to filter tables and views?

Filtering is one of the most common uses of controls. You can read all about it here.

What’s the difference between controls and buttons?

Buttons and controls are both points of interaction in a Coda doc. Buttons execute actions - such as changing table values, sending messages, and much more. Controls, on the other hand, simply contain values. And you can use formulas to connect the controls to other parts of your doc.

What are the “set control value” and “reset control value” buttons?

The set control value and reset control value are both pre-built button actions that affect controls. When you create a button, you will see these actions in the dropdown options.

The set control value action allows you to specify a control and a value for that control. When clicked, the button will change the value of the control accordingly.

The reset control value button, when clicked, will revert the specified control to any starting value that has been set for that control. Read more about setting starting values above.

Why don’t I see the option to select a starting value for my control?

You can only set starting values for personal controls. If the control is collaborative, there will be no option for a starting value.


Related resources

Did this answer your question?