Hey everyone! I’m struggling with a Notion formula for my contact database. I want to set reminders based on how long it’s been since I last reached out to someone. The tricky part is that the time varies depending on the type of relationship.
My formula looks like this:
if((prop("Relationship") == "Acquaintance" or prop("Relationship") == "Colleague" or prop("Relationship") == "Guide") and dateBetween(now(), prop("Last Contact"), "months") > 5, "Reach out soon!", if(prop("Relationship") == "Relative" or prop("Relationship") == "Old Buddy" and dateBetween(now(), prop("Last Contact"), "months") > 0, "Reach out soon!", if(prop("Relationship") == "Close Pals" or prop("Relationship") == "Core Family" and dateBetween(now(), prop("Last Contact"), "weeks") > 1, "Reach out soon!", "All good")))
It works fine for most categories but always says “Reach out soon!” for “Close Pals” and “Core Family” no matter when I last contacted them. I even tried changing “weeks” to “months” but no luck. Any ideas what’s wrong? Thanks!
I’ve dealt with similar issues in Notion formulas before. The problem seems to be in your nested if statements. They’re not properly closing, which causes unexpected behavior.
Try restructuring your formula like this:
if(
(prop("Relationship") == "Acquaintance" or prop("Relationship") == "Colleague" or prop("Relationship") == "Guide") and dateBetween(now(), prop("Last Contact"), "months") > 5,
"Reach out soon!",
if(
(prop("Relationship") == "Relative" or prop("Relationship") == "Old Buddy") and dateBetween(now(), prop("Last Contact"), "months") > 0,
"Reach out soon!",
if(
(prop("Relationship") == "Close Pals" or prop("Relationship") == "Core Family") and dateBetween(now(), prop("Last Contact"), "weeks") > 1,
"Reach out soon!",
"All good"
)
)
)
This should fix the issue with “Close Pals” and “Core Family”. The main change is proper grouping of conditions and closing of if statements. Let me know if this works for you!