automation

Go With The Salesforce Flow – Using Multi-Select Picklists

Posted by SFDCr

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!

 

Related Post

8 thoughts on “Go With The Salesforce Flow – Using Multi-Select Picklists

  1. Multiselect Magic: Manage Multiselect Picklists with Flow – UnofficialSF

    […] has never been good at managing multiselect picklist fields. Over the years, many intrepid flowhanites have provided assistance. Here, we provide an installable Flow Action that […]

  2. hEMA

    Hi ,
    Can you please let me know how to remove any one of picklist values from in multiselect picklist values ?

  3. NG

    Is there a way of doing this without having to resort to a screen element. I need this process to be fully automated.

  4. L. Gordon

    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.

    1. SFDCr

      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!

  5. Sana

    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?

    1. SFDCr

      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!

  6. Go With The Salesforce Flow - A Salesforce Visual Flow Series - SFDCr

    […] How to work with multi-select picklists within a flow, retain current values and append or add new ones. […]