Hi everyone, in this post we will talk about how we can fetch multi-select picklist(selected) values in any formula field. To get the selected value from picklist you can try TEXT(Picklist Field Name) and It will return the selected picklist value which makes slight easier to play with it however when it comes to multi-select picklist, we need to put more effort to accomplish our task.
One important point is to considered that we can not directly use TEXT function to convert multi select values into text . You can refer here for more information.
We can use INCLUDES in our formula to get the expected result and its recommended by Salesforce. You can play with the below code snippet and update it according to you need.
Basically here we are checking , if the values are available in multi-select picklist field then we are concatenating the values separated by a delimiter(;).
IF ( INCLUDES ( multipicklist__c , “Value 1” ), “Value 1; “,null ) &
IF ( INCLUDES ( multipicklist__c , “Value 2” ), “Value 2; “,null ) &
IF ( INCLUDES ( multipicklist__c , “Value 3” ), “Value 3; “,null ) &
IF ( INCLUDES ( multipicklist__c , “Value 4” ), “Value 4; “,null ) &
IF ( INCLUDES ( multipicklist__c , “Value 5” ), “Value 5; “,null )
This example would produce return values such as:
Value 1; Value 2; Value 3; Value 4; Value 5;
Value 1; Value 4; Value 5;
Value 2; Value 5;
Now we can see that it’s possible to show the contents of a multi-picklist field using the formula shown in this resolution. There is currently an Idea as well requesting to make this a standard functionality with the help of the existing TEXT() function: Support TEXT () function to convert “Multi-select picklist” to “Text”
I hope you find this post useful! Catch you in the next content.
And thank you for being an awesome reader.
Share and grow together !!
If you have any doubts you can comment down below, I will try to reply ASAP.
Also keep visiting us, for more such content!