function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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/
VIBHOR GOEL 47VIBHOR GOEL 47
Checkout this latest way to do this this using a downloadable apex action component that Parses and converts Multi Select Picklist values in a Flow to a Collection Variable here by Accidental Coder SF : https://www.accidentalcodersf.com/2021/01/parse-multi-select-picklist-values-flow.html
Mosh HamedaniMosh Hamedani
Information Transformation Services is endowing the clients with a stunning and impressive visual experience crafted by 3D Modeling Services. We are completely forted to offers our customers with a range of appealing 3D designs that are carefully crafted to meet with all type of requirements. 
 
Mosh HamedaniMosh Hamedani
Our (https://it-s.com/our-services/data-tranformation-services/web-scraping-services/)web scraping Service provides high-quality structured data to improve business outcomes and enable intelligent decision making,Our Web scraping service allows you to scrape data from any websites and transfer web pages into an easy-to-use format such as Excel, CSV, JSON and many others.