<aside> ⚠️ Due to how Notion handles recursive formulas (each day currently references the previous day's total), this example will fail after the 7th row as that's the limit on recursive iterations.
</aside>
if(prop("Previous") == prop("Name"), 0, if(empty(prop("Previous")), 1, prop("Previous ID") + 1))
if(prop("Previous") == prop("Name"), 0,
If Previous is the same as Name, return 0.
if(empty(prop("Previous")), 1,
Otherwise if Previous is empty, return 1.
prop("Previous ID") + 1))
Otherwise add 1 to Previous ID.
if(prop("ID #") != 0, slice("0000", length(format(prop("ID #")))), "") + format(prop("ID #"))
if(prop("ID #") != 0, slice("0000", length(format(prop("ID #")))),
If ID # doesn't equal 0, take the string 0000 and remove as many 0s from the front as there are digits in ID #.
, "")
Otherwise if ID # does equal 0, show nothing.
+ format(prop("ID #"))
Add the ID # to the end of the sliced 0000 string.
<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1649d2f9-1b45-478a-86b4-341fbe27e06f/benny.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/1649d2f9-1b45-478a-86b4-341fbe27e06f/benny.png" width="40px" /> By Ben • Latest • Was this helpful? Please consider buying me a coffee. Cheers!
</aside>