You need to sign in to do that
Don't have an account?

Checkbox Formula - Incorrect number of parameters for function
Hello Salesforce community!
I am having issues with the below formula checkbox to validate. I am receiving the error 'Incorrect number of parameters for function 'IF()'. Expected 3, received 4'. It has to be something silly such as a misplaced bracket - Any help would be greatly appreciated!
I am having issues with the below formula checkbox to validate. I am receiving the error 'Incorrect number of parameters for function 'IF()'. Expected 3, received 4'. It has to be something silly such as a misplaced bracket - Any help would be greatly appreciated!
/* If the override is checked, this field should be true */ IF( Marketing_Cloud_Sync_Override__c = True, True, /* If the unSync is checked, this field should be false */ IF( Marketing_Cloud_unSync_Override__c = True, False, /* For Member Contacts, if they are 18 or above and the status is set to active, this field should be true */ IF( RecordType.DeveloperName = "Member" && FLOOR((TODAY()-Birthdate)/365.2425) >= 18 && ISPICKVAL(Contact_Status__c , "Active"),True,False, /* For Lead Contacts, if they are 18 or above, email is not blank, the contact is less than a year old, this field should be true */ IF( RecordType.DeveloperName = "Lead" && FLOOR((TODAY()-Birthdate)/365.2425) >= 18 && (NOT ISBlank(Email)) && (TODAY()-DATEVALUE(CreatedDate)<= 365),True,False, /* For Group Contacts, if the email is not blank, this should should be true */ IF( RecordType.DeveloperName = "Group_Contact" && (NOT ISBlank(Email)),True,False,False)))))
You have 4 x elements in each of those. I would read it as each has an extra False
I find that fomating the formula often helps with finding these types of errors:
I would check to see if I have interpreted your logic correctly
regards
Andrew
All Answers
>> https://salesforce.stackexchange.com/questions/267973/error-incorrect-number-of-parameters-for-function-if-expected-3-received
As mentioned in the above forum thread as mentioned can you try checking if Your parentheses are in the wrong places? The AND function should have two parameters each. The compiler is seeing IF(AND(...), ..., True, IF(...;
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
You have 4 x elements in each of those. I would read it as each has an extra False
I find that fomating the formula often helps with finding these types of errors:
I would check to see if I have interpreted your logic correctly
regards
Andrew