0

I was trying to add some arithmetic inside of an IF function for a custom formula field and it didn't appear to like the syntax...

IF(AND(ISPICKVAL( Status,'In Progress'),ISPICKVAL( Priority ,'Critical')), NOW() - .00345, null)

Is there any way of doing something like this using a formula or am I better off implementing this with other functionality?

1
  • 4
    I think you need to write it as 0.00345 instead; it otherwise looks okay.
    – sfdcfox
    Jun 9, 2016 at 20:55

1 Answer 1

0

As @sfdcfox said, it will compile with this:

 IF(AND(ISPICKVAL( Status,'In Progress'),ISPICKVAL( Priority ,'Critical')), NOW() - 0.00345, null)
6
  • How would I implement multiple IF statements like this one?
    – VanAlfredo
    Jun 9, 2016 at 22:09
  • @Santanu Boral how is it different from sfdcfox comment?
    – o-lexi
    Jun 9, 2016 at 22:18
  • for instance IF(AND(ISPICKVAL( Status,'In Progress'),ISPICKVAL( Priority ,'high')), NOW() - 0.0069, null)
    – VanAlfredo
    Jun 9, 2016 at 22:18
  • @VanAlfredo use nested IF formulas or CASE, it depend
    – o-lexi
    Jun 9, 2016 at 22:21
  • IF(AND(ISPICKVAL(Status,'In Progress'),ISPICKVAL( Priority ,'Critical'),ISPICKVAL(Sub_Status_APS__c ,'Care')), NOW() - 0.00345, IF(AND(ISPICKVAL(Status,'In Progress'),ISPICKVAL( Priority ,'High'),ISPICKVAL(Sub_Status_APS__c ,'Care')),NOW() - 0.005175, IF(AND(ISPICKVAL(Status,'In Progress'),ISPICKVAL( Priority ,'Medium'),ISPICKVAL(Sub_Status_APS__c ,'Care')),NOW()- 0.0138,null)))
    – VanAlfredo
    Jun 10, 2016 at 2:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .