Skip to main content
I just wrote the following equation, and am getting the error code of: "Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2"

 

I selected a formula field, then I selected "Text" from the "fomula return type".  I am trying to get the field to say "Yes" if one of the following values are selected from a picklist.

 

IF(OR(ISPICKVAL(Status__c, 'Certified'),ISPICKVAL(Status__c, 'Purchased'),ISPICKVAL(Status__c, 'Returned')), "Yes")
3 answers
  1. Apr 20, 2019, 7:48 PM
    Hi Dave,

     

    I added "No" to your formula,

     

    IF(

     

    OR(

     

    ISPICKVAL( ForecastCategoryName , 'Certified')

     

    ,ISPICKVAL(ForecastCategoryName, 'Purchased')

     

    ,ISPICKVAL(ForecastCategoryName, 'Returned')

     

    ), "Yes","No")

     

     There are three parameters in If

     

    1)logical condition-

     

    OR(

     

    ISPICKVAL( ForecastCategoryName , 'Certified')

     

    ,ISPICKVAL(ForecastCategoryName, 'Purchased')

     

    ,ISPICKVAL(ForecastCategoryName, 'Returned')

     

    2)value if logical condition is true-"Yes"

     

    3)value if logical condition is false-"No"

     

     3rd parameter was missing in your formula

     

     

     

    This was selected as the best answer
0/9000