function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Glenn Nyhan 54Glenn Nyhan 54 

Picklist Formula for a Workflow Rule Not Functioning Error Message: Error: Incorrect number of parameters for function 'ISPICKVAL()' Expected 2, received 3

I've created a formula for a Workflow Rule to Update a field value. But I get and error message: Error: Incorrect number of parameters for function 'ISPICKVAL()' Expected 2, received 3

I don't seem able to correct this. Anyone have any ideas?

User-added image

 
Best Answer chosen by Glenn Nyhan 54
Yash VoraYash Vora
Hi Glenn,
As Niraj mentioned, you cannot give more than 2 parameters for ISPICKVAL. If you have to check for the "Annual Check/Cash" condition, you can add another ISPICKVAL in your OR function. And addign to it, after closing your OR function you need to provide the field update.

I hope the below code should work. 

IF(
OR(
ISPICKVAL(Payment_Channel__c, "Click and Pledge"),
ISPICKVAL(npe01_Membership_Origin__c, "Annual"),
ISPICKVAL(npe01_Membership_Origin__c, "Annual Cash/Check")),
Membership_End_Date_Less_30_Days__c = TODAY() , "false condition" )

All Answers

nit aroranit arora
try something like this ,change fieldnames  as per your requrement

IF( ISPICKVAL( StageName,"Needs Analysis") || ISPICKVAL( StageName,"closed lost"), TODAY(), TODAY() +2)
Niraj Kr SinghNiraj Kr Singh
Hi Glenn,

In 2nd ISPICKVAL(), you are giving three parameters. Where as it accept only 2 as you have mentioned in your 1st ISPICKVAL.
Just remove 2nd/3rd parameter from 2nd ISPICKVAL, as per your matching "npe01_Membership_Origin__c" field value.

Might be it will help you.
Yash VoraYash Vora
Hi Glenn,
As Niraj mentioned, you cannot give more than 2 parameters for ISPICKVAL. If you have to check for the "Annual Check/Cash" condition, you can add another ISPICKVAL in your OR function. And addign to it, after closing your OR function you need to provide the field update.

I hope the below code should work. 

IF(
OR(
ISPICKVAL(Payment_Channel__c, "Click and Pledge"),
ISPICKVAL(npe01_Membership_Origin__c, "Annual"),
ISPICKVAL(npe01_Membership_Origin__c, "Annual Cash/Check")),
Membership_End_Date_Less_30_Days__c = TODAY() , "false condition" )
This was selected as the best answer
Glenn Nyhan 54Glenn Nyhan 54
Thanks everyone for the suggestions. I was able to get this to finally work. 
Giovana DomineGiovana Domine
O meu ainda está dando o mesmo erro, podem me ajudar?