Database

The Length Function In Notion And Use-Cases

Screen Shot 2020-10-10 at 1.10.04 PM.png

🔎 Find The Length

The length function in Notion can be very useful for querying and calculating data. For instance, one can find titles over 30 characters or find the average number of items in a multi-list. Below is how the function works alone, and also some use-cases for it.

What The Length Function Does

  • It finds the amount of characters in the property it points to.

  • Included are empty spaces. For example, “The Matrix” is not 9 characters in length; the space makes it 10.

Screen+Shot+2020-10-10+at+8.14.40+PM.jpg

Length Syntax

length(prop(“NAME OF PROPERTY”))

Use-Cases The Length Function

Screen+Shot+2020-10-10+at+8.45.27+PM.jpg
Screen Shot 2020-10-11 at 9.41.10 PM.png
  • Find Average Star Rating In A Row

    • slice("⭐️⭐️⭐️⭐️⭐️", 0, (length(prop("Monday")) + length(prop("Tuesday")) + length(prop("Wednesday")) + length(prop("Thursday")) + length(prop("Friday")) / 2) / 5)

Screen Shot 2020-10-11 at 9.48.48 PM.png