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
Marco Pollastri 1Marco Pollastri 1 

picklist value countries

Hi, I am building a Process builder where I would like to create a formula that evaluates the country selected from the picklist Country on the lead object.

So my aim is to build this formula saying that if a country selected on the country picklist is China or Japan, then should trigger an action. How should I write the formula?
countries

OR(
ISPICKVAL([Lead].Country, China),

ISPICKVAL([Lead].Country,  Japan)

)


Thanks 
AbhinavAbhinav (Salesforce Developers) 
Hi Marco,

Not sure why you are using Type Formula you can select type as picklist andadd condition for both Picklist value. Choose Or condition for it

Something similar:

User-added image

If it helps Please mark it as best Answer.

Thanks!
Marco Pollastri 1Marco Pollastri 1
Hi Abhinav, thanks. But i want to solve it with the formula 
 
Maharajan CMaharajan C
Hi Marco,

Try the below formula:
 
IF( ISPICKVAL([Lead].Country , 'China' ), 'China',
IF( ISPICKVAL([Lead].Country , 'Japan' ), 'Japan',
NULL))

In Set conditions  Operator ==> Equals ,  Type ==> Formula, Value ==> above Formula.

https://developer.salesforce.com/forums/ForumsMain?id=9062I000000DKg1QAG

Thanks,
Maharajan.C

 
Sandhya V RaoSandhya V Rao
Hi Marco,

You are missing the quotes around China and Japan. 

Please try the below formula:

OR(
ISPICKVAL([Lead].Country, 'China'),
ISPICKVAL([Lead].Country, 'Japan'))

Hope this helps.

Regards,
Sandhya
Marco Pollastri 1Marco Pollastri 1
Hi All, 
Sandhya and Maharajan thanks for your help, 
Unfortunately, i still receive the error message:



Error



 
Maharajan CMaharajan C
Steve, In your formula quotes are missing so the error is coming please add the quotes in values.  China ==> 'China' . Japan ==> 'Japan'
 
IF( ISPICKVAL([Lead].Country , 'China' ), 'China',
IF( ISPICKVAL([Lead].Country , 'Japan' ), 'Japan',
NULL))

In Set conditions  Operator ==> Equals ,  Type ==> Formula, Value ==> above Formula.

Add one more condition also  to avoid nulls Field ==> [Lead].Country ,   Operator ==> Is null,  Type ==> Boolean , Value ==> False.


Thanks,
Maharajan.C
mukesh guptamukesh gupta
Hi Macro,

Please use below formula in your process builder
IF( ISPICKVAL([Lead].Country , 'China' ), 'China', IF( ISPICKVAL([Lead].Country , 'Japan' ), 'Japan', ''))

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Thanks
Mukesh