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

1vote

Dates and Nested If Statement

I've got a project with a status Select property and three properties with dates. I'm trying to get a formula to display a date based on the status. This formula WAS working, but now it's stopped past a certain point (the first portion still works, the rest displays nothing instead of the two remaining dates), and I can't figure out what I've changed that has made it stop working. Here are the status options:
Status Options

  1. If the status is Not Started or Outline In Progress, the date displayed should be Outline Due
  2. If the status is Outline Complete or Rough Draft In Progress, the date displayed should be Rough Draft Due
  3. Otherwise, the date displayed should be Final Draft Due

Step 1 is working correctly, but as soon as the status is anything different, the formula's not displaying anything.

formatDate(if(or(prop("Status") == " Outline In Progress", prop("Status") == " Not Started"), prop("Outline Due"), if(or(prop("Status") == " Outline Complete", prop("Status") == " Rough Draft In Progress"), prop("Rough Draft Due"), prop("Final Draft Due"))), "MMMM D, YYYY")

What am I missing that's making this not work? Thanks!

1 Answer

1vote

It looks like there might be some leading whitespace in your Status property comparisons that could be causing the issue.

The extra spaces at the start of the status strings, like " Outline In Progress" and " Not Started", can cause these comparisons to fail because the status value likely does not include this leading whitespace. This might be caused by the emojis there too. Try this and see if it resolves the issue.

I tried this formula without the white spaces and it works fro me. I did not play around with the emojis though.

formatDate(if(or(prop("Status") == "Outline In Progress", prop("Status") == "Not Started"), prop("Outline Due"), if(or(prop("Status") == "Outline Complete", prop("Status") == "Rough Draft In Progress"), prop("Rough Draft Due"), prop("Final Draft Due"))), "MMMM D, YYYY")

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