+ Start a Discussion
CrocketCrocket 

Formula field for multi-select picklist.

In a native UI we are looking to display multi-select picklist values (from another object) using a formula field. At least one of the associated picklists contains 30 selectable values. I am not certain of how may of those values can be selected, so lets assume 10 can be selected.   Is it correct that the only way to do this in a formula field is to use the INCLUDES and PRIORVALUE functions while checking for the presence of "each possible picklist value"? The following pseudocode might better explain this idea:

 

if (INCLUDES(myList, "STRING1")

    if PRIORVALUE(temp) == '""

       temp = "STRING1"

    else

       temp = temp +  ", STRING1"

 

if (INCLUDES(myList, "STRING2")

    if PRIORVALUE(temp) == '""

       temp = "STRING2"

    else

       temp = temp + ", STRING2"

 

. . .

 

if (INCLUDES(myList, "STRINGn")

    if PRIORVALUE(temp) == '""

       temp = "STRINGn"

    else

       temp = temp + ", STRINGn"

 

 

Guidence greatly appreciated.

 

Crocket.