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
Tony Montana 6Tony Montana 6 

I have the following use case

I have the following use case
If a Picklist Field 'Business unit' is 'eBay Plus' then a field 'Accounting' should be set to “Contra Transaction Revenue”. If the picklist 'Business unit' is “Top SKU” then a Field Accounting should be set  to “Marketing”
I have resolved above using standard criteria  in Process builder but having issues with below as I am  trying to use a formula.

If any other Business unit is other than 'eBay Plus Or Top SKU is selected,

And If Any of the 3 picklist fields below 

Has_buyer_committed_to_the_seller__c 
Incentivizing_Selling_Activity__c
Seller_Co_funding__c 

is Set to 'YES', then the  Field Accounting is set to 'Contra Transaction Revenue'.

I have the following but does not seem to work


AND(

OR(
ISPICKVAL([eForm__c].Business_Unit__c <> 'eBay Plus'),
ISPICKVAL([eForm__c].Business_Unit__c <> 'Top SKU'),

)

OR(
ISPICKVAL([eForm__c].Has_eBay_committed_to_the_seller__c = 'Yes'),
ISPICKVAL([eForm__c].Incentivizing_Selling_Activity__c = 'Yes'),
ISPICKVAL([eForm__c].Seller_Co_funding__c = Yes)
)
)

getting Error: Incorrect number of parameters for function 'ISPICKVAL()'. Expected 2, received 3
Would appreciate your help.

Thanks,
TM
AbhinavAbhinav (Salesforce Developers) 
Hi Tony ,

There seems few error 

Check this how to use picklist in formula:

https://trailhead.salesforce.com/content/learn/modules/advanced_formulas/picklist_formulas

After first Or condition end you have to give Comma, value will always enclosed in quotation marks

Thanks!
 
Maharajan CMaharajan C
Hi Tony,

Please write the formula like below:

Your ISPICKVAL syntax is not correct so you are getting this kind of error.
 
AND(
AND(
ISPICKVAL([eForm__c].Business_Unit__c, 'eBay Plus'),
ISPICKVAL([eForm__c].Business_Unit__c, 'Top SKU') 
),
OR(
ISPICKVAL([eForm__c].Has_eBay_committed_to_the_seller__c ,'Yes'),
ISPICKVAL([eForm__c].Incentivizing_Selling_Activity__c ,'Yes'),
ISPICKVAL([eForm__c].Seller_Co_funding__c, 'Yes')
)
)

I don't know why you put the OR cond in first check it should be AND.

Thanks,
Maharajan.C
Tony Montana 6Tony Montana 6
Hello Maharajan, Thanks for your response. But will this solution AND( AND( ISPICKVAL([eForm__c].Business_Unit__c, 'eBay Plus'), ISPICKVAL([eForm__c].Business_Unit__c, 'Top SKU') ), OR( ISPICKVAL([eForm__c].Has_eBay_committed_to_the_seller__c ,'Yes'), ISPICKVAL([eForm__c].Incentivizing_Selling_Activity__c ,'Yes'), ISPICKVAL([eForm__c].Seller_Co_funding__c, 'Yes') ) ) Work if a Business Unit other than 'eBay Plus' OR 'Top SKU' is selected.? I was referring to the clause below from the above Snippet. AND( ISPICKVAL([eForm__c].Business_Unit__c, 'eBay Plus'), ISPICKVAL([eForm__c].Business_Unit__c, 'Top SKU') ) Please let me know. Regards TM
Maharajan CMaharajan C
Sorry I missed the below NOT function:
 
AND(
AND(
NOT(ISPICKVAL([eForm__c].Business_Unit__c, 'eBay Plus')),
NOT(ISPICKVAL([eForm__c].Business_Unit__c, 'Top SKU'))
),
OR(
ISPICKVAL([eForm__c].Has_eBay_committed_to_the_seller__c ,'Yes'),
ISPICKVAL([eForm__c].Incentivizing_Selling_Activity__c ,'Yes'),
ISPICKVAL([eForm__c].Seller_Co_funding__c, 'Yes')
)
)

Thanks,
Maharajan.C