function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sienna Luard 3Sienna Luard 3 

Formula for calculating the # of days from a date field if the value of another field is NOT a certain value

I need a formula for field that calculates the # of days from a date field if the value of another field is NOT a certain value.  Here is what I have.

IF( ISPICKVAL ( On_boarding_Status__c  <>  "Handed Over"),
TODAY() -  Actual_First_Call_Date__c

I get this error.

Error: Syntax error. Missing ')'

Does anybody have any ideas?
ANUTEJANUTEJ (Salesforce Developers) 
Hi Sienna,

Can you please have a look at the below link:

>> https://salesforce.stackexchange.com/questions/58300/how-to-count-the-number-of-days-open-on-basis-of-picklist-value

I hope you find this useful and in case if this comes handy can you please choose this as best answer so that it can be used by others in the future.

Regards,
Anutej
Sienna Luard 3Sienna Luard 3
This does not seem to work.  The On_boarding_Status__c  field is a date field.

Any other ideas?
Alain CabonAlain Cabon
You cannot use <> but the negation NOT instead. 

You also need a value for the alternative IF ( condition , value if true , value if false )
IF( NOT ( ISPICKVAL ( On_boarding_Status__c ,  "Handed Over") ),
TODAY() -  Actual_First_Call_Date__c , 
0 )
Sienna Luard 3Sienna Luard 3
Thanks so much for your help!
That does the trick. (-: