last

Learn how to use the last function in Notion formulas.

The last() function will return the last item in a list.

last(list)

list.last()
Code language: JavaScript (javascript)
["Luffy", "Sanji", "Zoro"].last()
/* Output: "Zoro" */

/* In a database with a Relation property called Tasks: */
prop("Tasks").last()

/* Sample Output: "Set Up Compressor"
Code language: JavaScript (javascript)

last(), along with other list functions like first and at, are useful for accessing specific pages in a Relation property. Once you do this, you can access the properties of those pages:

prop("Tasks").last().prop("Status")

/* Sample Output: "Done" */
Code language: JavaScript (javascript)
About the Author

My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.

🤔 Have an UB Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas

🤔 Have a Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas