LogoFLO.W
  • Pricing
  • Blog
  • Docs
  • Thinking
  • About
Get Started
  • Detail Changes
  • Removal of the prop() Function Format
  • Support for Line Breaks and Comments
  • Faster Result Display and More Intuitive Error Messages
  • New Revert Button
  • Brand-New Dot-notation Syntax
  • Four New Default Properties
  • Date Function Changes
  • New Functions
  • Arrays
  • map
  • filter
  • parseTime
  • let and lets
  • ifs
  • Style
  • Conclusion
Notion 更新·
2023/11/27

Notion Formula 2.0 Deep Dive: A Complete Guide to 10+ New Features and Functions

A detailed breakdown of all new features and functions in Notion Formula 2.0, including Dot-notation syntax, array operations, map, filter, let, lets, ifs, style, and more to help you use Notion formulas more efficiently.

avatar for 二一
二一

Notion recently launched Formula 2.0, bringing multiple new features and functions that significantly improve formula usability and readability.

The new version removes the mandatory prop() format, supports line breaks and comments in code, and introduces four default properties along with a series of array processing functions. With the brand-new Dot-notation syntax, users can write and read formulas more concisely, streamlining data processing workflows.

These updates make Notion more powerful in data management and formula handling, providing users with a more efficient working experience.

Here are some things to keep in mind before reading this article:

  1. The feature details analyzed in this article are based on this official Notion article
  2. Reading this article requires some experience with Formula 1.0; otherwise, it may be difficult to appreciate the improvements in 2.0

Detail Changes

Removal of the prop() Function Format

In Formula 1.0, every property had to include the prop() format. When your formula got complex, the lengthy function format would drastically reduce readability.

Formula 2.0's removal of prop() makes formulas significantly shorter, greatly improving readability.

However, it's worth noting that when you copy this new Formula and paste it elsewhere (such as a Code block), the pasted text will still contain the prop() format:

if(and(or(prop("任务状态") == "Not started", prop("任务状态") == "In progress"), prop("剩余时间") <= 0), "😡 已逾期", if(and(or(prop("任务状态") == "Not started", prop("任务状态") == "In progress"), (prop("剩余时间") > 0) and (prop("剩余时间") <= 7)), "😱 即将逾期", "🤗 状态正常"))

For this reason, many of the functions shown in this article will continue to include the prop() format.

Support for Line Breaks and Comments

The editor now finally supports line breaks and adding comments, making formula writing more convenient — you won't get lost among countless brackets anymore.

now()                 /* Get the current date */
.dateAdd(1,"days")    /* Add 1 day to the current date */

To create a line break, press Shift+Enter. To add a comment, simply wrap your comment text between /* and */.

Faster Result Display and More Intuitive Error Messages

The editor now displays calculation results in real-time below the function, allowing you to quickly verify whether your function is written correctly.

If there's an error, it will also show a more intuitive and readable error message.

New Revert Button

When we edit an existing formula but the result turns out incorrect, we can now click the Revert button in the upper right corner to undo all changes.

Brand-New Dot-notation Syntax

In Formula 1.0, if we wanted to "calculate the number of days between a specific date and today," we would write:

dateBetween(now(),prop("Date"),"days")

If you then wanted to convert the calculated number of days to a string, you'd need to wrap it with format():

format(dateBetween(now(),prop("Date"),"days"))+ "" + "days"

This is the traditional function call syntax. When formulas get long, endless parentheses appear, and we constantly waste time tracking down missing brackets. When reading, we first have to find the matching parentheses to determine the correct reading order.

But now we can use the following brand-new syntax in Formulas:

now().dateBetween(prop("Date"),"days").format()

This update fundamentally changes how Formulas are written and read:

  • now() on the far left represents the object we're operating on
  • The following .dateBetween() function means we're calculating the date difference from now()
  • The final .format() means we're converting the result of the previous step to a string

Combined with the line break feature, formulas become much more readable:

now()                            /* Get the current time */
    .dateBetween(prop("Date"),"days")     /* Calculate against the Date property */
    .format()                      /* Convert the calculation result to a string */
    +" " + "days"                  /* Concatenate strings */
now()
    .dateAdd(1,"weeks")   /* Add 1 week to today's date */
    .format()             /* Convert the date calculation result to a string */

Four New Default Properties

Notion now includes four built-in default properties in the editor:

  • Created By
  • Created Time
  • Last Edited By
  • Last Edited Time

This means we no longer need to create a separate property when we need to use these.

Since Created By and Last Edited By are both associated with a Member, we can also use .name() or .email() to directly return the creator's (or editor's) name or email address.

So if you use Notion for team collaboration and multiple people edit the same database, you can use these built-in default properties to display the editor's name, email, or edit time in real-time.

Date Function Changes

dateStart and dateEnd

In Formula 1.0, if we wanted to get the start time or end time from a date range, the function syntax was Start() or end(). These two functions have now been renamed to dateStart() and dateEnd().

month, week, day

  • The month() function now returns values from 1-12, whereas in Formula 1.0 it was 0-11. For example, if the current month is November, month(now()) will return the number 11.
  • The day() function now returns values from 1-7, whereas in Formula 1.0 it was 0-6. For example, if today is Wednesday, day(now()) will return the number 3.
  • week(now()) returns which week of the year the current time falls in. For example, if today is November 6th, week(now()) will return the number 44.

New Functions

Arrays

In Formula 1.0, formula results only supported three output types: text, numbers, and booleans. But now Formula can also output results in list (array) format.

If we add +1 to an array, all values in the output will be increased by 1.

The sort() function can be used to sort an array.

The reverse() function can be used to reverse the order of a sorted array.

In addition to number sorting, alphabetical sorting by first letter is also supported.

The at() function can output the element at a specified position (0 for the first, 1 for the second).

Use first() or last() to get the first or last element respectively.

The unique() function removes duplicate values from an array, outputting only unique values.

The includes() function checks whether a specified element exists in an array — returns true if it exists, false otherwise.

The slice() function can extract a specified number of elements from an array.

In addition to number arrays, we can also select Person, Multi-select, and Relation properties in Formulas — Formula will directly output these properties as arrays.

Since the output is an array, all the functions mentioned above such as sort(), reverse(), and includes() can be applied to these properties.

For example, we can also use the length() function to quickly count the number of elements in an array.

Using this method, we can use the Person property to count votes.

Or use it to count the number of selections in a Multi-select.

The above covers only some basic array features. The following sections will introduce more functions and usage patterns for reference.

map

The basic expression for the Map function is map(list, expression). It takes a list (array) and returns another list after processing it through your custom expression.

Using the official example:

map([1, 2, 3], current + 1)
= [2, 3, 4]

Let's break down this formula:

  • [1,2,3] is the array we provided
  • current returns the current array element, and +1 adds the value 1 to it
  • [2,3,4] is the final result returned by the map function

Next, let's try using the map function to read a Relation property, with the expression being just current. This function will return the list of pages linked by the Relation property as-is.

If you add a dot . after current, the map function can read and output specific property information from within pages. For example, selecting the Status property causes the map function to return the current status of all tasks (pages).

If you select the Number (cost) property, the map function will return the cost property from all pages.

Thanks to array features, we can then use the min() or max() functions to find the item with the lowest or highest cost — and that's the most basic usage of the map function.

filter

With the help of the filter() function, we can use Formula to perform quick filtering on Relations directly, without needing to create a Rollup property.

In the PARA personal knowledge base methodology, areas and projects are linked together. For example, the sub-area "Note App Reviews" uses a Relation property to link to several review projects.

But over time, the number of projects linked to an area will inevitably grow, and this property will become increasingly crowded. Once the number of linked items exceeds 10, the extra items get collapsed.

So this is where we can use the filter() function to filter a Relation property. If I want to filter out incomplete projects (i.e., Status is not Done), the formula would be:

prop("关联项目").filter(current.prop("Status") !="Done")

Reading this formula from left to right, it means:

  1. The property being operated on is prop("关联项目")
  2. The operation is using .filter() to filter it
  3. The filter method uses the current variable to access the Status property of prop("关联项目")
  4. Finally, it filters out all items whose status is not Done (!= means "not equal to")

Similarly, if I want to filter out "projects where the person in charge is A," the formula would be:

prop("关联项目").filter(current.prop("负责人") == "A")

Adding the length() function allows us to count the number of items matching the filter criteria by calculating the number of elements in the array.

parseTime

In Formula 1.0, if we wanted to specify a custom date, the process was quite cumbersome. We needed to first convert the date to a Unix timestamp, then use the fromTimestamp() function to convert the timestamp back to a readable date format — a very tedious process.

But now we can use the parseTime() function to quickly input any date:

parseDate("2023-10-29")

However, the default date format returned might not match your expectations, so we can use the formatDate() function to specify the format you want:

parseDate("2023-10-29").formatDate("YYYY-MM-DD")

Custom dates created with parseDate() can then participate in date calculations with functions like dateBetween().

let and lets

In some complex formula calculations, we often encounter situations where we need to reuse the same calculation result repeatedly, but that result requires a long formula to derive. This can lead to the same lengthy formula appearing multiple times throughout the complete function, making it verbose and hard to read.

Here's a simple example. In Formula 1.0, suppose we have a "Sales Performance Database" containing Target Sales and Actual Sales properties. In subsequent commission calculations, we need to work with the Sales Completion Rate derived from Actual Sales / Target Sales. This means Actual Sales / Target Sales needs to appear repeatedly in the formula.

Of course, we could create an additional property to separately calculate the sales completion rate.

But with the introduction of let() and lets(), we now have a brand-new solution. Both functions allow you to define local variables within calculations, reducing repetitive formulas and improving overall readability.

The basic structure of let() is: let(variable, value, expression). The official example is:

let(name, "Doug Engelbart", "Hello, " + name + "!")
= "Hello, Doug Engelbart!"

This defines a variable called name and assigns it the value "Doug Engelbart". Then in subsequent calculations, we can use this variable name directly to construct a greeting.

Additionally, the name Doug Engelbart in this example is actually an easter egg from Notion — he was a scholar who had a profoundly significant influence on the development of Notion as a product.

The basic structure of lets() is: lets(variable, value, variable2, value2, ..., expression). The official example is:

lets(a, "Hello", b, "world", a + " " + b)
= "Hello world"

This defines two variables: a and b, assigned the values "Hello" and "world" respectively, then uses them to construct a simple sentence.

So let's return to the question from the beginning of this section. To avoid Actual Sales / Target Sales appearing repeatedly in the formula, we can use let() to define a variable called "Sales Completion Rate" and assign it the value Actual Sales / Target Sales. Then we specify that when the sales completion rate is greater than 1, the bonus is 1000 yuan; when less than 1, there's no bonus:

let(
    销售完成率,prop("实际销售额")/prop("目标销售额"),   /*Define sales completion rate*/
    if(prop("销售完成率")>1,1000,0)           /*Return different bonuses based on different completion rates*/
)

ifs

When writing if() functions in Formula 1.0, one very headache-inducing problem was how easy it was to miss parentheses in nested conditions. For example, in the following performance salary calculation, different performance ratings correspond to different salary multipliers, so our if function had to be written like this:

if(prop("年终评级") == "不合格", prop("基础工资") * 0.8,
    if(prop("年终评级") == "合格", prop("基础工资") * 1,
        if(prop("年终评级") == "良好", prop("基础工资") * 1.1,
            if(prop("年终评级") == "优秀", prop("基础工资") * 1.2, prop("基础工资") * 1.5))))

But with the addition of the ifs function, we can simplify the entire function to this:

ifs(

    prop("年终评级") == "不合格", prop("基础工资") * 0.8,
    prop("年终评级") == "合格", prop("基础工资") * 1,
    prop("年终评级") == "良好", prop("基础工资") * 1.1,
    prop("年终评级") == "优秀", prop("基础工资") * 1.2,
    prop("基础工资") * 1.5

    )

You only need commas to separate different conditions, and only one closing parenthesis is needed at the end, greatly improving both the writing and reading experience.

Style

In Formula 1.0, if we wanted to add some decoration to the output text, the most we could use was emoji symbols.

But now Notion has introduced the style function, which lets us freely specify string font color, background color, whether to bold, and other styling features.

The usage of Style is also very simple. To achieve a bold effect, just add .style("b") after the string.

In the Formula tooltip, the official options include the following formats:

  • "b": bold
  • "i": italic
  • "u": underline
  • "c": code
  • "s": strikethrough

The available font colors are:

  • gray
  • brown
  • orange
  • yellow
  • green
  • blue
  • purple
  • pink
  • red

If you want to add a background color to the font instead, simply append the _background suffix to the color name.

Conclusion

That concludes the basic breakdown of Formula 2.0. I'm very excited to see what new changes Notion's next major update will bring. When it happens, I'll be the first to share with all readers. Until next time — thank you for your support!


📘 FLO.W — Notion Personal Management System

FLO.W is a Notion-based personal management template that integrates tasks, notes, projects, habits, and more, complete with comprehensive tutorials.

Ready-to-use Notion template system
Complete tutorials included, beginner-friendly
Continuously updated and maintained
Learn About FLO.W Template✨ 1237+ users chose FLO.W
2023/11/27
Share this post
All Posts

More Posts

Notion Home View: New Features and Detail Improvements
#Notion 更新

Notion Home View: New Features and Detail Improvements

Notion Home view adds Calendar integration and database linked views, sidebar sorting and filtering improvements, plus desktop app window pinning and more practical updates.

2024/05/29
Notion 2.3.0 Update Roundup: Sprints, GitHub Integration & Database IDs
#Notion 更新

Notion 2.3.0 Update Roundup: Sprints, GitHub Integration & Database IDs

A roundup of Notion 2.3.0 updates, including Sprint management for databases, deep GitHub integration, and unique database ID fields, enhancing project management and development collaboration.

2023/05/31
Notion 2024 Product Highlights: Calendar, Passkey, Charts & Avatar Tool
#Notion 更新

Notion 2024 Product Highlights: Calendar, Passkey, Charts & Avatar Tool

A recap of Notion's key 2024 product updates: Notion Calendar launch, Passkey login support, database chart enhancements, and the official avatar generator — everything you need to know about Notion's latest developments.

2024/01/17

Newsletter

Join the community

Subscribe to our newsletter for the latest news and updates

LogoFLO.W
TwitterX (Twitter)YouTubeYouTubeBilibiliXiaoHongShuEmail
Product
  • Features
  • Pricing
  • FAQ
Resources
  • Blog
  • Documentation
  • Notion Custom Agent
Company
  • About
  • Contact
Legal
  • Cookie Policy
  • Privacy Policy
  • Terms of Service

Subscribe for more Notion tips and updates

© 2026 FLO.W, All rights reservedNotion is a trademark of Notion Labs, Inc. This is an independent third-party site, not affiliated with or endorsed by Notion.
Featured on Uneed