Logo

Go With The Salesforce Flow – Using Multi-Select Picklists

Salesforce Flow Series

Using Multi-Select Picklists Within A Flow

Have you ever tried using multi-select picklists within a Salesforce Flow?  Did you update the picklist field with a new value and instead of adding the new value it replaced the existing value(s)?

I’ve found this to be a very unintuitive aspect of Salesforce Visual Flow.  If you do it wrong, you update the multi-select picklist field with new values, but wipe out the already existing values.  I have good news, however, because today I will show you a workaround!

Adding, Not Replacing, A Multi-Select Picklist Value In Flow

First store the existing picklist values as a multi-select picklist variable in your Record Lookup step.

Multi-Select Picklist Flow - Store Variable

Ensure the variable is set to “Picklist (Multi-Select)” data type.

Multi-Select Picklist Flow - Variable Type

Use a “Multi-Select Picklist” field within a Screen Element for users to interact with.

Multi-Select Picklist Flow - Choice Field

Create a new choice to be used as the default and set it to the variable that was set in the Record Lookup step.

Multi-Select Picklist Flow - Create Default Choice

Now create a new choice for every option you would like to provide your user.

Multi-Select Picklist Flow - Create Desired Choices

After you are done creating the necessary choices, ensure you set the correct one as the default choice as shown on the “Screen” image above.

Now create a Record Update step to update the desired multi-select picklist field from the value in the screen field.

Multi-Select Picklist Flow - Update Record From Multi-Select Field

 

That’s it!  But, what if you want to update using a different type of Screen Element field?  Check out below to see how you would update with a boolean field.

Create a boolean field.

Multi-Select Picklist Flow - Boolean Field to Update Multi-Select Picklist

 

Then, after creating a Decision step to determine whether the user has checked the box, create an Assignment step.  The Flow will utilize this step only if the box is checked.  Here, I’ve used another variable to store the record’s current picklist values.  Ensure that you use the “Add” operator and that you add a semicolon before the picklist value.

Multi-Select Picklist Flow - Assignment Add And SemiColon

Now add a Record Update step to update the picklist value with the variable’s value.

Multi-Select Picklist Flow - Update Field From Variable

 

Now we’re ready to run through the entire process!  Check out the Opportunity below.  The Multi-Select picklist field “Topics” currently has the values: Purchasing & Accessories.

Multi-Select Picklist Flow - Opp With Two Values Selected

Our Screen Element properly displays those as the two chosen fields, and gives use two available choices: Warranty & Service.

Multi-Select Picklist Flow - Add Two Values

I’ve gone ahead and added both of them and click “Next” in the flow.

Multi-Select Picklist Flow - Add Two Values

The Record Update takes place, and if I refresh the Opportunity, I now see the additional values were added to the two already existing values.  It didn’t wipe out what was already there…perfect!

Multi-Select Picklist Flow - Refresh Opp Values Added

Now, in my Flow I reach the boolean checkbox.  I check and click “Next.”

Multi-Select Picklist Flow - Use Boolean for Repair

Now when I refresh my Opportunity and click into the Topics field I see the following in the box and just below it.  All 5 values have been selected within the field and only “Replacement” has not been selected.

Multi-Select Picklist Flow - Opp Adds Repair

 

There you have it, we were able to successfully update a multi-select picklist within a Flow using two different methods & fields (one requiring an assignment step).  We successfully updated the values without removing or replacing the existing values.  Way to go!

Check out the rest of the Go With The Salesforce Flow Series for more Visual Flow tips & tricks!

 

5 comments for “Go With The Salesforce Flow – Using Multi-Select Picklists

  1. Sana
    November 14, 2016 at 4:17 pm

    Excellent post. I have a similar requirement.

    I have a multiselect picklist(MSP) field from lead mapped to account and contact (created custom MSP as in Lead to Account and Contact). When lead(MSP value is A) converted to new account.MSP value in Account is A. When new lead (with MSP value B) converting to existing account(that has MSP as A). I want MSP value in account as A,B. Can this be achieved using flow?

    • SFDCr
      November 19, 2016 at 2:35 pm

      Yes Sana! That sounds exactly like the requirement above. You want to add (not replace) the existing value. You would want to add B and not remove the A that currently exists! Try it out with flow using the info above and let me know if you run into any issues!

  2. L. Gordon
    November 8, 2018 at 2:44 pm

    Hi,

    Great post. I see you had to create Choices for each available MSP picklist. I have a dependent MSP, so the choices are many. Is there a way to capture the possible dependent values based on a pre-existing controlling field, then offer only those as choices in a separete, dynamic MSP variable? I want the user to just ADD to the existing MSP values.

    • November 8, 2018 at 4:54 pm

      Thanks Lori for your comment and question! I know you could use multiple decision elements in your flow based on the user’s initial selection and then present the appropriate screen and value for subsequent selections. Not sure if dependent picklists on the same screen is something that has been introduced but I think this would require multiple screens unfortunately. Give it a shot and let us know if there is an easier way!

Leave a Reply

Your email address will not be published. Required fields are marked *