0
IF( AND( High_Profile__c = "True" ,ISPICKVAL(Priority,"P1")), "Msg1", 
IF( AND( High_Profile__c = "True" ,NOT (ISPICKVAL(Priority,"P1"))), "Msg2" ,
IF( High_Profile__c = "False" , "No")))

Error: Incorrect number of parameters for function 'IF()'. Expected 3, received 2

1 Answer 1

2

I recommend you to format such big formulas. Once you do it, you see, that you missed to pass one parameter to last IF condition: "High Profile is neither false nor true". So, considering, that High_Profile__c isn't boolean

IF(
    AND(
        High_Profile__c = "True" ,
        ISPICKVAL(Priority, "P1")
    ),
    "Msg1", 
    IF(
        AND(
            High_Profile__c = "True" ,
            NOT(ISPICKVAL(Priority,"P1"))
        ),
        "Msg2" ,
        IF(
            High_Profile__c = "False",
            "No",
            "High Profile is neither false nor true"
        )
    )
)

your formula can be re-written in the following more readable way:

IF(
    High_Profile__c = "True",
    IF(
        ISPICKVAL(Priority, "P1"),
        "Msg1",
        "Msg2"
    ),
    IF(
        High_Profile__c = "False",
        "No",
        "High Profile is neither false nor true"
    )
)

if you can have High_Profile__c as boolean (Checkbox) field type, this formula becomes very simple:

IF(
    High_Profile__c,
    IF(
        ISPICKVAL(Priority, "P1"),
        "Msg1",
        "Msg2"
    ),
    "No"
)
1
  • Thank you Oleksandr. I appreciate your quick response. I tired the last formula but got error : Error: Incorrect parameter type for function 'IF()'. Expected Boolean, received Text
    – Uni
    Commented Oct 11, 2018 at 17:38

You must log in to answer this question.

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