Logo

Tag Archive for picklist

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!

 

Go With The Salesforce Flow – How to Default the Current Picklist Value

Salesforce Flow Series

Salesforce Flow – How to Default An Existing or the Current Picklist Value

Have you ever wanted to use a dropdown list within a Salesforce Flow Interview Screen and have it dynamically populate with the current value of that picklist field?  Well I’m here to show you how!

First, make sure you store the current value of the picklist field in a variable within a Lookup step in your flow.  Here, I’m storing/assigning the current Delivery/Installation Status value to a variable.

Salesforce Flow Record Lookup

Then, on the desired screen where you would like to present this information, add a “Dropdown List” field.

Salesforce Flow Add Dropdown List

Now, you will want to give your users a choice between all of the available values of that picklist field.  Hint: using this method to add a choice future-proofs your flow so that even when available picklist values are changed your flow won’t need to be updated!  Within the choice settings section, select “Picklist Choice.”

Salesforce Flow Add Picklist Choice

Now you will choose the Object & Field where you would like to pull the available choices from.  Notice the spelling mistake “Piclist Choice Settings” – c’mon Salesforce!

Salesforce Flow Add Picklist Choice

Now let’s quickly recap what we’ve accomplished so far.  We’ve taken the current value of a picklist field and stored it within a Flow Variable.  We’ve also added a Dropdown List field to an Interview Screen and populated it so that our user can choose from all of the available picklist values from the same field.  If we stopped here, we would be storing the current value in a variable, but the Dropdown List on the Interview Screen wouldn’t automatically default to the current value.  The user could choose from any available value for that field but would not have any way of knowing what the current value on the record is.  See, I can’t set the Default Value!

Salesforce Flow No Default Option

The key to selecting a default value is to create another choice, this time just a standard “Choice.”

Salesforce Flow Create Default Choice

Now this is where it gets fun.  Instead of typing a static Label for this default choice, we are going to use the variable we stored so that it will always dynamically display the text of the current value.  We also want the variable’s value to be the “Stored” value of this selection so that if we update the record from this Screen Choice Field the correct information will be passed.

Salesforce Flow Create Default Choice

Now we are able to set the Default Value of our Dropdown List to this new default choice.

Salesforce Flow Screen Picklist Field

Here it is in action!  We have an Opportunity that has a current Delivery/Installation Status value of “In progress.”  If we interact with this Opportunity via our Flow, we would expect to see this value already populated.

Salesforce Opportunity

Sure enough, “In progress” is the selected value within our Dropdown List field!

Salesforce Flow Defaults to Existing Value

One important note: this method will actually create two choices that are exactly the same.  We created a choice that contains the full list of all available values for this picklist field, and then we also have the default/current value.  As you can see below, you see “In progress” twice.  It doesn’t matter which one you select, this field would pass the same value!

Salesforce Picklist Duplicated

 

Stay tuned as our Salesforce Flow Series continues with more tips & tricks!