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
Kathleen Munetz-Vasquez 3Kathleen Munetz-Vasquez 3 

Need help with an ISPICKVAL formula, I have an account state picklist and a Billing/Shipping state picklist field, I need the formula to return which ever one is populated.

This is the formula I created.

IF(ISPICKVAL( AccountID__r.Billing_Shipping_State__c ,"AccountID__r.Billing_Shipping_State__c",
 AccountID__r.State__c ))
Best Answer chosen by Kathleen Munetz-Vasquez 3
Taha Syed | SalesforceTaha Syed | Salesforce
Hi Kathleen, you can use this.

IF (TEXT(Field1) != Null, TEXT(Field1),
IF (TEXT(Field2) != Null, TEXT(Field2),
Null ))

All Answers

Taha Syed | SalesforceTaha Syed | Salesforce
Hi Kathleen, you can use this.

IF (TEXT(Field1) != Null, TEXT(Field1),
IF (TEXT(Field2) != Null, TEXT(Field2),
Null ))
This was selected as the best answer
Kathleen Munetz-Vasquez 3Kathleen Munetz-Vasquez 3
Hi Taha-Syed,

Thanks again for your help! This worked like a charm!
Taha Syed | SalesforceTaha Syed | Salesforce
You are welcome. Please mark as best answer so others can also benefit.
Deepak_KumarDeepak_Kumar
Hi Kathleen, Try this.
IF( Account.BillingState !=null, Account.BillingState , 
IF( Account.ShippingState !=null, Account.ShippingState , '') 
)

I have done this code on Contact Object. Hope this will help you.
Kathleen Munetz-Vasquez 3Kathleen Munetz-Vasquez 3
Thanks for your help as well Deepaksingh!