Return to site

Multi-Select Picklist Formulas

Business Problem:

Most Salesforce Administrators have run into this issue from one time or another. A Multi-Select Picklist is not accessible in formulae. This is frustrating because Multi-Select picklists are great choices for data quality and user experience and it's not always known at the planning stages that you will need to utilize the field in question for a formula.

Formula Solution:

IF(
INCLUDES(Multi_Select_Picklist__c , "A"), "A",
IF(
INCLUDES(Multi_Select_Picklist__c , "B"), "B",
IF(
INCLUDES(Multi_Select_Picklist__c , "C"), "C"
, NULL
)
)
)

A while back, Salesforce.com released the use of the INCLUDES()function which is a function that checks a text based value and returns a boolean (true/false) value. Since the database result of a Multi-Select Picklist is a text based value we can utilize the INCLUDES() function. By database result, I mean how the value is actually stored in Salesforce.com. When you save a Multi-Select Picklist it's values are saved as text with comma's separating the values you selected. In the example above, If I selected all the values the value that is stored is actually "A, B, C"

But... what if I select more than one option in my Multi-Select Picklist? In this case, you must build in each option included in a AND() Function. Here's an example:

IF(
AND(
INCLUDES(Multi_Select_Picklist__c , "A"),
INCLUDES(Multi_Select_Picklist__c , "B")
)
, "A; B", NULL
)