Help

Re: Logic of Nested IF statements

Solved
Jump to Solution
1123 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Oswego_County_M
4 - Data Explorer
4 - Data Explorer

I have fields named Tasks, Due Date, Task Completed and Status. Using a guide from another post I came up with:
IF({Task Completed?}=1,“Done”, IF(IS_BEFORE({Due Date}, TODAY()), “Overdue”, “In Progress”)).

This works fine. But, I would like to somehow have it so if the task field is Empty, it returns “No Task”. How would I add that to the above formula without confounding what is already going on? It’s like a third ELSE statement, or am I thinking completely backwards on this?

1 Solution

Accepted Solutions
Jason
Airtable Employee
Airtable Employee

Hi @Oswego_County_Monume! You need one more IF statement wrapped around you current formula, in a structure like this:

IF(
   {Task Completed?},
      RUN CURRENT FORMULA,
      "No Task"
)

 

This completed formula should do the trick:

IF(
   {Task Completed?},
   IF(
      {Task Completed?}=1,
         "Done", 
   IF(
      IS_BEFORE({Due Date}, NOW()), 
         "Overdue", 
         "In Progress"
   )
   ),
      "No Task"
)

See Solution in Thread

2 Replies 2
Jason
Airtable Employee
Airtable Employee

Hi @Oswego_County_Monume! You need one more IF statement wrapped around you current formula, in a structure like this:

IF(
   {Task Completed?},
      RUN CURRENT FORMULA,
      "No Task"
)

 

This completed formula should do the trick:

IF(
   {Task Completed?},
   IF(
      {Task Completed?}=1,
         "Done", 
   IF(
      IS_BEFORE({Due Date}, NOW()), 
         "Overdue", 
         "In Progress"
   )
   ),
      "No Task"
)
Oswego_County_M
4 - Data Explorer
4 - Data Explorer

Thank you! That did the trick. I will figure out later exactly how that works so I can apply to future formula fields, but for now this will do it. Thanks!