I think we all have been there – you are working on a beloved Microsoft Flow, doing any number of updates or other actions, when it happens...
You use a value that is a multiple-value array, like a choice column in SharePoint, and Flow automatically wraps your action in a ForEach control. Now what?
Let’s say, for example, you're getting an approval for something. You send an email, once your request is approved, including some of the details. One of the values is a multi-value choice column, but the moment you choose your email action, it gets wrapped inside a ForEach condition. The column has values like this in the list:
If your column has 3 values in the column, you will be sending 3 emails! You try to drag your email outside of the ForEach, but you are blocked...
At this point, you might be Googling while thinking, "Maybe I should make a string variable, build a semicolon string of the values, and use that text string instead?"
Just like your marching band jacket from high school, that ForEach has got to go! Thankfully, this process is easier than trying to decide whether or not to put your gray socks in with your lights or darks!
Microsoft is actually one step ahead of you here. All you have to do is click the button, “Switch to input entire array” next to the column:
Now, you can simply pick your value and it sets without the ForEach:
By default, the actions for a multiple-value choice column are set to gather input in an array-type fashion. Meaning, Flow is expecting the need to ready each value (Level 1, Level 2 in my example) separately. After we switch the input mode, we’re telling Flow not to read each value, but to accept an entire array.
When you only need to value a status value, setting the choice column to the same existing set of values, you don’t want any ForEach. The situation is common and easily remedied using the above directions.
Whenever you have a question or need help (and/or training) when it comes to building Microsoft Flows, please reach out to us. We’re here to help!
The complementary paper includes over 12 years of research, recent survey results, and CRM turnaround success stories.
This 60-second assessment is designed to evaluate your organization's collaboration readiness.
Learn how you rank compared to organizations typically in years 1 to 5 of implementation - and which areas to focus on to improve.
This is a sandbox solution which can be activated per site collection to allow you to easily collect feedback from users into a custom Feedback list.
Whether you are upgrading to SharePoint Online, 2010, 2013 or the latest 2016, this checklist contains everything you need to know for a successful transition.