Notion Formula 2.0: New Features and Migration Guide
🔍 WiseChecker

Notion Formula 2.0: New Features and Migration Guide

Notion Formula 2.0 introduces a rewritten formula engine that supports modern programming concepts like variables, functions, and conditional logic. If you have been using legacy formulas in your databases, you may notice that some old syntax no longer works or behaves differently. This article explains the new features step by step and shows you exactly how to migrate your existing formulas without breaking your data.

Key Takeaways: Migrating to Notion Formula 2.0

  • Formula property > Edit formula: Opens the new formula editor where you can test and rewrite legacy expressions.
  • let() and if() functions: Replace nested ternary operators and repetitive calculations with cleaner variable-based logic.
  • Database > Duplicate as a test: Always duplicate your database before migrating formulas to avoid losing data.

What Changed in Notion Formula 2.0

Notion Formula 2.0 replaces the old formula engine that relied on a single expression line with no variables or reusable functions. The new engine supports named variables via the let() function, multi-line formatting, and proper if() / else if() / else conditional blocks. It also introduces new data types like Date, Boolean, and Array with dedicated operations.

The root cause of most migration failures is that old formulas used implicit type coercion and relied on the format() function for text output. In Formula 2.0, every expression returns a specific type, and you must explicitly convert values using functions like toNumber() or toString(). If you try to add a text string to a number, the formula will return an error instead of guessing your intent.

New Functions You Should Know

let() assigns a name to a value so you can reuse it without repeating the calculation. if() replaces the old ? : ternary syntax. empty() checks if a property has no value. contains() checks if a text string includes a substring. slice() extracts a portion of text or an array.

Steps to Migrate Your Existing Formulas

Before you edit any live formulas, duplicate the database that contains them. This gives you a safe sandbox to test the new syntax.

  1. Duplicate your database
    Open the database page. Click the three-dot menu in the top-right corner. Select Duplicate and choose a location. Rename the copy to “Test Migration”.
  2. Open the formula editor
    In the duplicate database, add a new formula property. Click the formula cell to open the editor. The new editor supports multi-line input and syntax highlighting.
  3. Rewrite ternary operators as if() blocks
    Old syntax: prop("Status") == "Done" ? "Complete" : "Pending"
    New syntax: if(prop("Status") == "Done", "Complete", "Pending")
  4. Replace format() with toString()
    Old syntax: format(prop("Price"))
    New syntax: toString(prop("Price"))
  5. Use let() for repeated calculations
    Old syntax: prop("Subtotal") 0.08 + prop("Subtotal")
    New syntax: let(subtotal, prop("Subtotal"), subtotal 0.08 + subtotal)
  6. Test with sample rows
    Add a few test rows to the duplicate database. Confirm the new formula returns the same results as the old formula. If you see an error, check for missing toString() or toNumber() conversions.
  7. Replace the original formula
    Once the duplicate formula works correctly, open the original database. Edit each formula property and paste the new syntax. Save and verify the results.

Common Migration Errors and How to Fix Them

Formula returns “Type mismatch” error

This occurs when you try to combine values of different types without explicit conversion. For example, adding a number to a text string. Use toNumber() on text properties that contain numeric values, or toString() on numbers before concatenating them with text.

Old ternary operator still works but shows a deprecation warning

Notion Formula 2.0 still supports the old ? : syntax for backward compatibility, but it will eventually be removed. Rewrite it using if() to future-proof your database.

let() variable not recognized outside the function

Variables defined with let() are only available inside that function call. If you need the same variable in multiple parts of the formula, use a separate let() for each scope or nest the let() calls.

Date calculations return unexpected results

In Formula 2.0, date arithmetic uses the dateAdd() and dateSubtract() functions instead of simple addition. Old formulas that added numbers directly to dates will break. Replace prop("Due") + 7 with dateAdd(prop("Due"), 7, "days").

Notion Formula 2.0 vs Legacy Formula: Key Differences

Feature Formula 2.0 Legacy Formula
Variable support Yes, via let() No
Conditional logic if() / else if() / else Ternary ? : only
Type conversion Explicit (toString, toNumber, toDate) Implicit coercion
Multi-line editing Yes Single line only
Array operations map(), filter(), slice() Not available

Notion Formula 2.0 gives you more control and fewer unexpected results. The migration effort is small for most databases, and the new syntax makes complex formulas easier to read and maintain. Start by duplicating one database and rewriting its formulas using the steps above. Once you are comfortable, apply the same process to your other databases.

After migrating, explore the map() and filter() functions to process arrays from rollup properties. These functions can replace dozens of lines of nested ternary logic with a single readable expression. Use the empty() function to handle missing values gracefully instead of relying on if(prop("Field") != "", ...).