Coda vs Notion: Formulas
What do they share and where do they differ?
The big ones.
The more significant differences between Coda’s and Notion’s approaches to formulas.Canvas formulas.
Notion empowers you to write formulas in columns and table filters, while Coda allows for formula writing in nearly every aspect of its product. In Coda you can write formulas absolutely anywhere! Some places you can write formulas are:- Table filters
- Conditional formats
- Table columns
- Column options
- Inline / Canvas formulas
- Automations
- Buttons
- Today().WeekdayName()
- Today().MonthName()
- Today().Year()
The formula Now() outputs the current date and time.
A dashboard built in Coda that automatically updates to always show live, up-to-date information.
Endless references.
Coda allows you to reference anything in your doc from anywhere else in your doc. You can infinitely refer to other databases, other columns in other pages, controls and sliders on the canvas, and more. Notion formulas only allow you to reference properties that are immediately accessible in the table in which you are writing a formula.Action formulas.
Action formulas are likely one of the largest ways Coda’s approach differs from Notion’s, so it’s important to cover this area in a bit more depth. First, let’s explore the difference between two larger types of formulas: passive and active.Passive vs active formulas.
In Notion, formulas are passive in nature. They take a set of inputs and produce an output but they do not have the ability to make changes to anything other than their output. On the other hand, Coda’s action formulas are all active, enabling users to take actions that modify data in the doc, trigger actions within the app, or make changes in external services.Changing data in your doc.
One of the key capabilities of Coda’s action formulas is the ability to change data in your doc. Users can add or modify rows, duplicate pages, set control values, and perform various other data manipulation tasks. This level of interactivity allows for dynamic updates and makes it easier to automate repetitive tasks, perform more advanced calculations, and create more app-like experiences for users.Interactivity in Coda allows for dynamic updates.
Making changes in external services.
In addition to changing data within the doc and triggering actions in the app, Coda’s action formulas can also make changes in external services. This integration capability opens up a world of possibilities, allowing users to create calendar events in Google Calendar, update the status of Jira issues, send messages in Slack, and more. As of this writing, there are over 700 available Coda packs made by Coda employees as well as Coda enthusiasts! You can check them all out here. By seamlessly connecting with external services, Coda empowers users to automate tasks and streamline their workflows across different platforms. Coda’s button actions are also configurable by users and able to connect with a service that has an API. So if a connection for a button action doesn’t already exist, you can build it yourself!Manual and automatic execution.
Coda’s action formulas can be executed manually or automatically. Users have the flexibility to add these actions to buttons or automations, which can be triggered either by user interaction or automated events including inbound webhooks.The small things.
The following are small aspects of writing formulas in Coda that make the experience easier, more accessible, and less prone to human error.Output type hints.
Numbers, lists, text, row-references, dates, true/false. All of these are data types, and every time you write a formula in Coda or Notion the output of your formula has a certain type. Understanding these types is crucial to writing formulas that work, and using or referencing that data later on. In Coda, when you are writing any formula, you are always given live information on what final data type your formula will output.While writing formulas, you will always see an icon in this area. This specific screenshot shows that the output type of this formula is a number.
Object hint types (by icon or clicking).
When writing formulas in Coda, each object in your formula (which corresponds to a row, column, table, etc.) will give you a hint as to what its data type is. Understanding the data type of an object makes writing formulas 100x easier and, even more importantly, they help you understand what you cannot do in a formula. For example:- You can’t add/subtract text values, only numbers.
- You can’t check if a task is coming up this week if you aren’t comparing date values.
- You can’t use list operators, i.e., Slice(), Splice(), Count(), Filter(), on values that aren’t lists. So, for example, you can’t count the number of tasks due for a project if the tasks aren’t held as a list.
- Table
- Date value
- Date value
- Boolean value (true/false)
- Text
- List of numbers
Coda displays the data types of every referenced object in a formula.
Reference highlights (e.g., referenced column).
Formulas often become complex, referencing different columns or objects within your databases. When writing a Coda formula, everything you reference is highlighted in your doc itself to help you better understand where your data is coming from and what data you are referencing. In this example, you can see the different columns and objects referenced in your formula highlighted in green and pink. The green shows that it’s coming from this one table, and the pink shows it’s from a different place.Coda clearly displays the different columns and objects referenced in your formula highlighted in green and pink.
Auto-formatting.
Long formulas can become nearly impossible to understand without formatting—and a formula that cannot be understood cannot be modified and fixed. With the click of a button, Coda will auto-format a formula which leads to more easily understandable formulas. Notion allows for breaking lines and ignoring white space like Coda formulas but all formatting must be manually inserted.Coda's auto-formatting feature in action.
Single-line comments (with //).
Traditional coding in JavaScript allows you to comment in two ways:- Blocks of comments with /* */
/* Enclosing anything with this syntax allows one to insert blocks of comment ignored when a script is run */ - Single-line commenting with //
// For shorter comments, JavaScript allows you to add single lines of comments
This formula in Notion shows that single-line commenting is not possible on the platform.
Auto-suggest comparison values.
In Coda, when you are writing formulas and referencing select-lists or relations to other tables, you get auto-suggestions for the possible selection types. These auto-selections make formula writing quicker and more accurate, as the user is less prone to spell something wrong and receive invalid results.Coda's auto-suggestions make formula writing quicker and more accurate.
Stable comparisons.
Even more importantly, Coda’s comparisons are stable. For example, in the formula pictured below, a user is filtering contract types to find contracts that are Current.Filters in Coda are less prone to breaking when workflows or wording are modified.