+ Start a Discussion
Jack VolkovJack Volkov 

Iterating through Multi-Select Picklists values via a Flow Loop Element?

Is it possible to iterate through a collection multi-select picklist values on a single record using a flow loop element?
Jack VolkovJack Volkov

According to this post, How do I assign multiselect picklist values to a collection variable in a flow? (https://developer.salesforce.com/forums/?id=906F0000000AntQIAS), it is not possible to assign a multi-select field to a collection variable but wanted to verify.
Jack VolkovJack Volkov
This Salesforce Sidekick article by David Litton, Parse a Multi-Select Value in Visual Flow (https://salesforcesidekick.com/2016/11/07/parse-a-multi-select-value-in-visual-flow-unmanaged-package-included/),  provides a flow that can be called from other flows to parse a multi select picklist value.
  1. Download David's managed package
  2. In your flow, create a normal text (aka string) variable to hold your multi select picklist value
  3. In your flow, create a collection variable
  4. Call the "Parse Multi-Select" unmanaged package flow from your flow, using the string variable above as the input, and collection variable as the output
  5. Voila, your multi select picklist is now parsed out as an actual collection (in your collection variable)
Gaurav HandooGaurav Handoo
Hi Jack

This is the flow that might help you achieve the same:
User-added image

Here the catch is parsing decision box which acts as a small loop in itself (working on the length of the text variable containing the list of Ids, of the values passed) while segregating values separated by semi colon into a collection. This is done by two assignment steps ahead:

User-added image

User-added image

User-added image

If you see, in first and third screenshot (amongst the above three) , I've used another variable (SinglePricebookIdMaker, ReplaceOriginalStringwithleftover), which actually is a formula variable to evaluate the string of values getting passed. Following are the screenshots for both the formulas

SinglePricebookIdMaker
IF(
	CONTAINS({!SelectedPricebookId},";"),
	TRIM( 
    	LEFT(
             {!SelectedPricebookId} , 
             FIND(
             	";",{!SelectedPricebookId}
             	) - 1
             )
    	),
	{!SelectedPricebookId}
	)

ReplaceOriginalStringwithleftover
IF(
	CONTAINS({!SelectedPricebookId},";"),
	TRIM(
		SUBSTITUTE(
			{!SelectedPricebookId},{!SinglePricebookIdHolder}+";",""
			)
		),
	TRIM(
		SUBSTITUTE(
			{!SelectedPricebookId},{!SinglePricebookIdHolder},""
			)
		)
	)

Hope this helps.

Cheers!!

Gaurav
Gaurav HandooGaurav Handoo
Hi Jack

If this answer helped, please mark it as solution.

Cheers!!

Gaurav
John LedyardJohn Ledyard
This is the one and only way to accomplish. I had the same issue and this article saved me. Note the comments at the bottom where I provided the formula for "OneRecord" that was ommitted in the original article. 

http://succeedwithsalesforce.com/parsing-an-objects-multi-select-picklist-selections-to-use-in-a-visual-flow/