Objective :
In this, we will handle Multi-Select Picklist Values Using Flows by splitting the selected values based on the semicolon and storing them in a collection of strings.
Use Case :
Here, we took an example of creating an account record by entering the Account Name,
Phone, City, and Capital using screen flow. Here the City is of type Multi picklist and the
Capital is of type picklist.
The flow allows creating account records only when the Capital value is not selected in the
City values.
Step 1 :
Create a Screen Flow, we have created a flow ‘Account Flow with Multi Select Picklist’.
Added the Screen to get the input of Name, Phone, City, and Capital values from the User.
Step 2 :
In the Assignment element, assigned the selected City multi-picklist value to the new
variable.

Created four formula variables
Variable | Formula |
SeparateString | (LEFT({!SelectedCity},FIND(“;”,{!SelectedCity })-1)) |
LastSeparateString | TRIM((RIGHT({!SelectedCity},LEN({!Select edCity})-FIND(“;”,{!SelectedCity})))) |
RemoveAddedString | TRIM(SUBSTITUTE({!stringToRemove}, {!SeparateString}, “”)) |
SplitString | TRIM( SUBSTITUTE( {!Select_City}, “;”,””) ) |
Step 3 :
Added Assignment element, in that, added the each selected multi-select picklist value to the
Collection of list.
Removed the added value from the selected City (i.e) string variable which contains selected
multi-select picklist values.

Step 4 :
Added a decision to add all selected values are added to the list and to stop the
recursive call when the last selected value is added.


Step 5 :
Using the Collection filter element, get the selected capital value which is present in
the selected city multi-pick list value.

Step 6 :
Added the decision to check if the string collection which is returned from the
collection filter has value, it will not allow creating account record or else account record will
be created for the given values.



The Final Flow will be

Output
For the selected Capital value that does not contain in selected City value.


For the selected Capital value that does not contain in selected City value


We are Inno Valley Works, We are a passionate team of developers, best thinkers and consultants who can solve anything and everything.
With our highly engaging team, you can easily bring the vision to all your business ventures come true.
We have team, put your problem, get your solution
🎥 Check Out Our YouTube Channel
Explore helpful tutorials, product updates, and feature walkthroughs from the team at Innovalley Works.
👉 Visit Our Channel