Notion Answers

Help between Notion users


Register & Ask

It's free & easy

Get answers

Answers, votes & comments

Vote and select answers

Receive points, vote and give the solution

Question

0vote

help me understand this Notion formula

i want a quick website where i can paste this formula to understand it as it's unreadable in this format

if(not empty(prop("Recur Interval")) and not empty(prop("Due")), if(prop("Recur Interval") > 0 and prop("Recur Interval") == ceil(prop("Recur Interval")), formatDate(if(length(prop("Days (Only if Set to 1 Day(s))")) > 0 and prop("Recur Unit") == "Day(s)" and prop("Recur Interval") == 1, if(dateBetween(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, if(test(format(prop("Due")), "AM|PM"), now(), dateAdd(now(), prop("UTC Offset"), "hours")), now()), now()), prop("Due"), "days") >= 1 and unequal(formatDate(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), "MMMM D, YYYY"), formatDate(prop("Due"), "MMMM D, YYYY")), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 1, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 1, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 2, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 2, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 3, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 3, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 4, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 4, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 5, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 5, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 6, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 6, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 7, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), 7, "days"), fromTimestamp(9.07002e+11)))))))), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(prop("Due"), 1, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(prop("Due"), 1, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(prop("Due"), 2, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(prop("Due"), 2, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(prop("Due"), 3, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(prop("Due"), 3, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(prop("Due"), 4, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(prop("Due"), 4, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(prop("Due"), 5, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(prop("Due"), 5, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(prop("Due"), 6, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(prop("Due"), 6, "days"), if(length(replaceAll(replaceAll(prop("Days (Only if Set to 1 Day(s))"), formatDate(dateAdd(prop("Due"), 7, "days"), "dddd"), "§"), "[^§]", "")) > 0, dateAdd(prop("Due"), 7, "days"), fromTimestamp(9.07002e+11))))))))), if(prop("Recur Unit") == "Month(s) on the Last Day", prop("Last Day Base Date"), if(prop("Recur Unit") == "Month(s) on the Last Weekday", if(dateBetween(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, if(test(format(prop("Due")), "AM|PM"), now(), dateAdd(now(), prop("UTC Offset"), "hours")), now()), now()), prop("Last Weekday Base Date"), "days") >= 1 or equal(formatDate(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), "L"), formatDate(prop("Last Weekday Base Date"), "L")), if(day(prop("Next Last Base Date")) == 0, dateSubtract(prop("Next Last Base Date"), 2, "days"), if(day(prop("Next Last Base Date")) == 6, dateSubtract(prop("Next Last Base Date"), 1, "days"), prop("Next Last Base Date"))), prop("Last Weekday Base Date")), if(prop("Recur Unit") == "Month(s) on the First Weekday", if(dateBetween(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, if(test(format(prop("Due")), "AM|PM"), now(), dateAdd(now(), prop("UTC Offset"), "hours")), now()), now()), prop("First Weekday Base Date"), "days") >= 1 or equal(formatDate(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), "L"), formatDate(prop("First Weekday Base Date"), "L")), if(day(dateSubtract(prop("Next Last Base Date"), date(prop("Next Last Base Date")) - 1, "days")) == 0, dateSubtract(prop("Next Last Base Date"), date(prop("Next Last Base Date")) - 2, "days"), if(day(dateSubtract(prop("Next Last Base Date"), date(prop("Next Last Base Date")) - 1, "days")) == 6, dateSubtract(prop("Next Last Base Date"), date(prop("Next Last Base Date")) - 3, "days"), dateSubtract(prop("Next Last Base Date"), date(prop("Next Last Base Date")) - 1, "days"))), prop("First Weekday Base Date")), if(dateBetween(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, if(test(format(prop("Due")), "AM|PM"), now(), dateAdd(now(), prop("UTC Offset"), "hours")), now()), now()), prop("Due"), "days") >= 1 and unequal(formatDate(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, dateAdd(now(), prop("UTC Offset"), "hours"), now()), now()), "L"), formatDate(prop("Due"), "L")), if(equal(dateBetween(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, if(test(format(prop("Due")), "AM|PM"), now(), dateAdd(now(), prop("UTC Offset"), "hours")), now()), now()), prop("Due"), prop("Simplified Recur Unit")) / prop("Recur Interval"), ceil(dateBetween(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, if(test(format(prop("Due")), "AM|PM"), now(), dateAdd(now(), prop("UTC Offset"), "hours")), now()), now()), prop("Due"), prop("Simplified Recur Unit")) / prop("Recur Interval"))), dateAdd(prop("Due"), multiply(dateBetween(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, if(test(format(prop("Due")), "AM|PM"), now(), dateAdd(now(), prop("UTC Offset"), "hours")), now()), now()), prop("Due"), prop("Simplified Recur Unit")) / prop("Recur Interval") + 1, prop("Recur Interval")), prop("Simplified Recur Unit")), dateAdd(prop("Due"), multiply(ceil(dateBetween(if(formatDate(now(), "z") == "UTC", if(not empty(prop("UTC Offset")) and prop("UTC Offset") >= -12 and prop("UTC Offset") <= 14, if(test(format(prop("Due")), "AM|PM"), now(), dateAdd(now(), prop("UTC Offset"), "hours")), now()), now()), prop("Due"), prop("Simplified Recur Unit")) / prop("Recur Interval")), prop("Recur Interval")), prop("Simplified Recur Unit"))), dateAdd(prop("Due"), prop("Recur Interval"), prop("Simplified Recur Unit"))))))), "MMMM D, YYYY"), "Error in Recur Interval: Non-Whole or Negative Number"), "")

1 Answer

1vote

polle Points94310

No one will be able to help you without any context and without seeing the actual Notion template to understand the complete structure and how it works.

Even having access to the Notion template, asking someone to spend 5 hours to explain you a huge formula makes no sense, because the formula needs a template to work, just having a formula makes nothing. Makes sense?

If you don't understand 1 + 1 it complicates things asking someone to explain 5(- 3x - 2) - (x - 3) = -4(4x + 5) + 13.

You should ask something specific to solve a problem and not something like this, because it has no answer.

I suggest that you learn Notion formulas from scratch and you will at least understand what each line means.

Like the first one: If the property Recur Interval is not empty and the property Due is not empty then do the following.

That is the first one before the comma and the problem is that explaining the same for 300 actions with no context, will not help you in anything.

1vote

ahnonnie commented

Sorry for being unspecific, the code is meant to be used for a recurring task table/calendar view. I got it from Tom Franks explains. I took the code directly from his Advanced Recurring Tasks template, but for some reason when I pasted it into my formula field, that error emerged even though I didn't tweak anything. The error doesn't show in Frank's table.

0vote

polle commented

The problem is the same @ahnonnie and it is impossible to know which arguments are missing without having access to your Notion Workspace. Please comment in your question to avoid confusion. :)

Please log in or register to answer this question.

...

Welcome to Notion Answers, where you can ask questions and receive answers from other members of the community.

Please share to grow the Notion Community!

Connect