0

I am trying to calculate if a support case breached the SLA time. However, I don't want to calculate the breach time if there is a null value in one of the fields. I have tried the below but get an error.

IF(NOT(ISNULL(Flexible_SLA_Time__c > 
    CASE(b1_case_severity__c, 
        "1 - Critical", 9.5, 
        "2 - High", 9.5, 
        "3 - Medium", 19, 
        "4 - Low", 28.5, 0),
    1,
    0
))))

Error when encoding row-level formula: Incorrect number of parameters for function 'IF()'. Expected 3, received 1

1 Answer 1

0

I think You're IF function's True and False execution is available in wrong place. May be it's should be as follows,

 IF (

(NOT(ISNULL(Flexible_SLA_Time__c)) &&  (Flexible_SLA_Time__c> 
    CASE(b1_case_severity__c, 
        "1 - Critical", 9.5, 
        "2 - High", 9.5, 
        "3 - Medium", 19, 
        "4 - Low", 28.5, 0))),1, 0
)

Please let me know if it helps.

3
  • Thanks for this, however, I now receive the following error. Error when encoding row-level formula: Incorrect argument type for function 'ISNULL()'.
    – mtm1186
    Nov 1, 2021 at 16:41
  • I have updated my answer. Please try it.
    – Raj
    Nov 1, 2021 at 16:46
  • That works, thanks a lot!!!
    – mtm1186
    Nov 1, 2021 at 16:48

You must log in to answer this question.

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