Loop on Multi Select Option Set Values Using Cloud flow - CloudFronts

Loop on Multi Select Option Set Values Using Cloud flow

Problem Statement: We wanted to run an action on all the selected values in a multi select option set(choice).We get the data in a comma separated string.

Solution:

1.When we get the values in comma separated values, we will need to convert the string to an array format.

Formula: array(split(Input comma separated data),','))

2. Get the output from the compose step and add in parse Json to create a Json object.

3.Add an apply to each on Json body and you can use the item(apply_to_each) to access the data from the Json object.

Compose 
• I nputs 
Parse JSON 
Apply to each 
• Se t from 
{x} 
Set variable 
Outputs x 
-type": •array", 
"type": 
Generate from sample 
outputsu X

Conclusion: Instead of complicating the flow with switch or if condition to check the data and then run the flow, we can loop on Multi select option set value using apply to each action.


Share Story :

Secured By miniOrange