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

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
    Oct 11 '18 at 17:38

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.