Skip to content

Update the multi-select picklist field’s value using flow without losing existing values

This article walks you through updating a multi-picklist field’s values without losing existing values using flow.

Let’s assume you have a multi-picklist field Multipicklist__c on the opportunity object with the following five values.

  1. Option 1
  2. Option 2
  3. Option 3
  4. Option 4
  5. Option 5

Now you want to add Option 3 to the multipicklist__c field automatically when an opportunity is updated to closed won without losing existing values.

SOLUTION

Create a record trigger flow on the opportunity object and make it run when the opportunity is updated. Now set entry criteria as below.

Stage → ISCHANGED → TRUE

STEP 1

Create a text variable with the name as ExistingValue as shown in the attached screenshot.

ExistingValue text variable

STEP 2

Put an assignment element inside the flow and assign the existing multi-picklist field’s value to this new variable using the assignment operator as shown in the attached screenshot.

Assign the existing value to a variable.

 STEP 3:

Now create a formula variable with the return type text as mentioned in the attached screenshot.

Formula to populate the new value.
IF(ISBLANK({!ExistingValue}),
"Option 3;",
IF(INCLUDES({!$Record.multipicklist__c}, "Option 3"),{!ExistingValue},
{!ExistingValue}&";"&"Option 3;"
)
)

STEP 4

Update the record and assign the formula value to the multipicklist__c field as shown in the attached screenshot.

Update the multi-picklist field with the new value.

Great. Now activate the flow and you are done.

The final look of the flow.

The final look of the flow.