Iterate Multi Picklist in Flow without Apex in Salesforce

Iterate Multi Picklist in Flow without Apex in Salesforce

Sample Flow:
 

 

Variables:
listSelectedIndustries is a Collection Variable to hold list of selected industries to show it on the Selected Industries Screen.

currentVal is to get the first value from the selected multi picklist values.

updatedIndustriesSelection is to hold the remaining values from the selected multi picklist values after removing the first value.

AccountIndustryPicklistValues is Picklist Choice Set to get picklist values from Industry field.

listSelectedIndustriesInitially is used to hold the selected values from the Home Screen. As we iterate, the values will be removed one by one in Semi Colon Assignment.

Home Screen:
To select multi picklist values.

 

Initial Industries Assignment:
Assigns listSelectedIndustriesInitially variable with the selection from the Home Screen.

Iterate Industries Selection:
Contains Semi Colon Node:

Checks whether listSelectedIndustriesInitially contains semi colon ‘;’.

Doesn’t Contains Semi Colon Node:
Default. listSelectedIndustriesInitially doesn’t contains semi colon ‘;’.

 
Semi Colon Assignment:
Adds currentVal formula variable value to the listSelectedIndustries collection variable.
Assigns listSelectedIndustriesInitially with the updateIndustriesSelection formula variable value.
 

No Semi Colon Assignment:
Adds updateIndustriesSelection formula variable value to the listSelectedIndustries collection variable.
 

 

Selected Industries Screen:
Displays the listSelectedIndustries collection variable.

 
Output:
 

 

Leave a Reply