Pages

Friday, June 10, 2016

Salesforce: Convert Multi-Select Picklist to Text


Multi-Select Picklist is nice for user to use in Salesforce user interface, but there are many limitations for admin to use this type of field, because it support limited functions compare to other fields type.

More than a year ago, we blog about How to sort Multi-Select Picklist in View? This blog will share about how to convert Multi-Select Picklist to Text, so you can use it in many areas.

As of now (Summer '16 release), multi-select picklist only support following functions:
  • INCLUDES()
  • ISBLANK()
  • ISNULL()
  • ISCHANGED() - only in assignment rules, validation rules, workflow field updates, and workflow rules in which the evaluation criteria is set to Evaluate the rule when a record is: created, and every time it’s edited.
  • PRIORVALUE()only in assignment rules, validation rules, workflow field updates, and workflow rules in which the evaluation criteria is set to Evaluate the rule when a record is: created, and every time it’s edited.

With a simple formula field return text format, you can get the multi-select picklist values in Text.
Let say you have a custom multi-select picklist field called Country__c with 5 values. Here is the formula:
 IF( INCLUDES(Country__, 'Singapore'), 'Singapore,', null) +   
 IF( INCLUDES(Country__, 'Indonesia'), 'Indonesia,', null) +   
 IF( INCLUDES(Country__, 'Malaysia'), 'Malaysia,', null) +   
 IF( INCLUDES(Country__, 'China'), 'China,', null) +   
 IF( INCLUDES(Country__, 'Japan'), 'Japan,', null)   


Reference: Tips for Working with Picklist and Multi-Select Picklist Formula Fields


2 comments:

  1. what if there are two field updates of same Multi-select Pick-list field(due to number of option more created one more field update), how to get all the select options into a single text field.

    ReplyDelete

Page-level ad