Help

Re: If (or?) Formula help please

1783 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Candace_Strickl
5 - Automation Enthusiast
5 - Automation Enthusiast

I am not sure how to add in an “or” situation to this formula.
Here is my formula:
IF({Task Start Date},IF({Task Status}=‘Completed’,{Description}&" | “&‘COMPLETE’&” | “&DATETIME_FORMAT({Status Updated},‘MM/DD’),{Description}&” | “&DATETIME_FORMAT({Task Start Date},‘MM/DD’)),{Description}&” |")

This only works if my Task Start Date is completed, but I need the Description to show regardless of the date column being filled.
Does this need an if/or statement?

Thanks!

6 Replies 6

If {Description} is supposed to always be present, you could take out of the IF() statement. Try a simplified formula like this one:

{Description} & IF({Task Status}="Completed", " | " & "COMPLETE" & " | " & DATETIME_FORMAT({Status Updated},"MM/DD"), IF({Task Start Date}, " | " & DATETIME_FORMAT({Task Start Date},"MM/DD")))

The middle of the formula could be simplified a hair further. There’s no need to concatenate several literal strings…

... " | " & "COMPLETE" & " | " ...

Merge them into a single string:

... " | COMPLETE | " ...

lol, I should have seen that!

Candace_Strickl
5 - Automation Enthusiast
5 - Automation Enthusiast

Thank you for your help. Unfortunately, the simplified formula is not working either and just gives an #ERROR!.
Don’t I need an “or” statement?

If I understand your desired end result correctly, no you don’t need an OR() statement. You may be getting an error if your date fields aren’t filled in. So try something like this:

{Description} & IF(AND({Status Updated}, {Task Status}="Completed"), " | COMPLETE | " & DATETIME_FORMAT({Status Updated},"MM/DD"), IF({Task Start Date}, " | " & DATETIME_FORMAT({Task Start Date},"MM/DD")))

Candace_Strickl
5 - Automation Enthusiast
5 - Automation Enthusiast

I’m thinking it might not be working because the “Task Start Date” is filled when a script template is used. Could that be why the error is happening?