You need to sign in to do that
Don't have an account?
Question on IF Statement within a Formula Field
I have a formula that pretty much works correct:
Effecively if the Completed Date is not null and Close Date is greater than or equal to Due Date, then the field is "YES".
So I came up with this:
However, I get the following error:
Error: Syntax error. Missing ')'
I'll spare you the details of all the gyrations I've gone through the the ')'. Suffice it to say the cursor goes to the comma ( , ) after the (CompletedDate__c) field.
As always your help is always appreciated! Thank you!
IF(ISNULL(dueDateTime__c), "YES", ( IF( ISNULL(closeDateTime__c), ( IF(dueDateTime__c >= NOW(), "YES", "NO")), ( IF(dueDateTime__c >= closeDateTime__c, "YES", "NO")) )) )So far so good...however I have yet another condition I want to check.
Effecively if the Completed Date is not null and Close Date is greater than or equal to Due Date, then the field is "YES".
So I came up with this:
IF(ISNULL(dueDateTime__c), "YES", ( IF( ISNULL(closeDateTime__c), ( IF(dueDateTime__c >= NOW(), "YES", "NO")), ( IF(dueDateTime__c >= closeDateTime__c, "YES", "NO")), ( IF (AND( NOT(ISNULL(CompletedDate__c), (IF(closeDateTime__c >= dueDateTime__c, "YES", "NO")))))))))
However, I get the following error:
Error: Syntax error. Missing ')'
I'll spare you the details of all the gyrations I've gone through the the ')'. Suffice it to say the cursor goes to the comma ( , ) after the (CompletedDate__c) field.
As always your help is always appreciated! Thank you!
IF(ISNULL(dueDateTime__c), "YES",
( IF( ISNULL(closeDateTime__c), IF(dueDateTime__c >= NOW(), "YES", "NO"),
( IF (AND( NOT(ISNULL(CompletedDate__c)), (closeDateTime__c >= dueDateTime__c)), "YES", IF(dueDateTime__c >= closeDateTime__c, "YES", "NO")))
)))
All Answers
IF(ISNULL(dueDateTime__c), "YES",
( IF( ISNULL(closeDateTime__c), ( IF(dueDateTime__c >= NOW(), "YES", "NO")),
( IF (AND( NOT(ISNULL(CompletedDate__c)), (closeDateTime__c >= dueDateTime__c))), "YES", ( IF(dueDateTime__c >= closeDateTime__c, "YES", "NO")))))
)
Error: Syntax error. Missing ')'
Except now we're here:
....the cursor moves to the comma before "YES"
IF(ISNULL(dueDateTime__c), "YES",
( IF( ISNULL(closeDateTime__c), IF(dueDateTime__c >= NOW(), "YES", "NO"),
( IF (AND( NOT(ISNULL(CompletedDate__c)), (closeDateTime__c >= dueDateTime__c)), "YES", IF(dueDateTime__c >= closeDateTime__c, "YES", "NO")))
)))
IF(ISNULL(dueDateTime__c), "YES",
( IF( ISNULL(closeDateTime__c), IF(dueDateTime__c >= NOW(), "YES", "NO"),
( IF (AND( NOT(ISNULL(CompletedDate__c)), (closeDateTime__c >= dueDateTime__c)), "YES", IF(dueDateTime__c >= closeDateTime__c, "YES", "NO")))
)))
I tried to change it...but the discussion board system isn't being very cooperative...