0

I want to use this formula field in workflow rule time trigger but i am getting error-

Error:

Formula result is data type (Text), incompatible with expected data type (Date/Time).

formula field code is below.

IF(ISPICKVAL(Priority_Time__c, "P1"),  Now()- 0.03109,  

IF(ISPICKVAL(Priority_Time__c, "P2"),Now()- 0.03800), 

"false"  )  )
  • 1
    "false" is not a Date/Time, you need to fix your FALSE scenario and return null or another valid Date/Time – Boris Bachovski Jul 4 '17 at 5:54
  • Hi Bachovski, Whether i am returning null than also got same error Error: Formula result is data type (Text), incompatible with expected data type (Date/Time). – Md Parwej Jul 4 '17 at 5:57
  • what do you want to return in false case scenario? – night crawler Jul 4 '17 at 5:57
  • Try this IF(ISPICKVAL(Priority_Time__c, "P1"), Now() - 0.03109, IF(ISPICKVAL(Priority_Time__c, "P2"), Now() - 0.03800, null), null) – Boris Bachovski Jul 4 '17 at 5:58
  • If condition will be true than return Date/Time.If false than it should also return flase in Date/Time type – Md Parwej Jul 4 '17 at 6:00
0

This should work

> IF(ISPICKVAL(Priority_Time__c, "P1"), Now() - 0.03109,
> IF(ISPICKVAL(Priority_Time__c, "P2"), Now() - 0.03800, null))
  • Hi Night Your above solution is working Thanks Night – Md Parwej Jul 4 '17 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.