web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / "Apply to each" block ...
Power Automate
Answered

"Apply to each" block keeps getting added for all strings.

(0) ShareShare
ReportReport
Posted on by 43

I am trying to make a simple Flow that sends an email when an item is added to a Sharepoint list.  For every string column in the list of Dynamic fields I try to display in the email step, it automatically wraps the email step in another "Apply to each" block.  It's turning a simple task into a very frustrating, complicated mess!  I never had this much trouble using SP Designer 2013 workflows.  Does Power Flow really see every string as an array of individual characters and expect, automatically, that someone is going to want to process each little character separately? I'm at the end of my patience with this product.

 

I've read other posts pertaining to the same issue and tried to follow those examples but my flow never turns out looking the same as theirs.  How can I stop my flow from wrapping everything in an "Apply to each block"?

Categories:
I have the same question (0)
  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hello @pamjustice 

     

    I have written a blog post on how to bypass the apply to each:

    https://flowaltdelete.ca/2020/04/12/bypass-apply-to-each-loop/

     

  • pamjustice Profile Picture
    43 on at

    @Jcook   Thank you for your suggestion.  I read through the blog but I'm not sure how I would apply this to my situation.  I'm not adding multiple items to a list or even processing multiple items.  I'm simply trying to send an email when one new item is added to the list.  I have a couple of choice fields and a few text fields, (both single and multiple lines of text) and the email is just to display those fields for the one item that was added.  Your blog seems to have some complex steps to avoid the stupid loop that gets automatically added by the flow.  Is there something simple I can do to solve this?  When I first started using Flow about a year ago, it didn't behave like this.  When and why was this loop added by Microsoft?

    Thanks

    Pam J.

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hi @pamjustice 

    Please share a screenshot of your Flow.

     

    The apply to each loop gets added every time the values are an Array. Even if the Array has only 1 item it will still add the Loop. 

  • pamjustice Profile Picture
    43 on at

    @Jcook 

    Screenshot of workflow

    pamjustice_0-1601407438004.png

    The instant I added either the Severity field or the ApplicationsEffected field, the Apply to Each loop imprisoned the whole email step.  Severity is a choice field and ApplicationsEffected is a multiline text field.

    Pam J

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hi @pamjustice 

     

    Is your Choice column allowed multiple selections?

     

    This is why the Apply to each is required. Power Automate recognizes that there could be more than 1 selected, so its defined as an array.

     

    To get the values into an email, the easiest would be to use a Select action. And then use the Outputs of that select action in the email.

    Jcook_0-1601409664614.png

     

     

    If your column is not multi select, I would recommend checking your SharePoint List formats. I could only replicate the behavior you're having by enabling multi select on the choice column.

     

    I could not replicate your issue with multi line text column. Please check this settings for these fields in your List 

     

  • pamjustice Profile Picture
    43 on at

    @Jcook 

    The Severity field does not allow multiple choices as far as I know.

    pamjustice_0-1601416437151.png

    I was always under the impression that both DropDown menu and Radio button properties only allow the user to choose one option.  I created this workflow a long time ago but in editing the flow I have wiped out all the steps and re-added them several times with no joy.  Do you think I should delete the whole workflow and make a new one completely from scratch?  I'll try switching the Severity field to Radio buttons first and/or try your latest suggestion.

    Thanks

    Pam J

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hi @pamjustice 

     

    Edit the column in the List view:

    Jcook_0-1601417192549.png

     

    Could you run the Flow and copy the output from your trigger and paste it here.

     

  • pamjustice Profile Picture
    43 on at

    I will try what you ask tomorrow.

    Thanks

    Pam J

  • pamjustice Profile Picture
    43 on at

    @Jcook 

    My choice column has never allowed multiple selections. Still the whole workflow gets wrapped in that annoying loop.

    pamjustice_0-1602255584009.png

     

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Ji @pamjustice 

     

    Could you run the Flow and copy the output from your trigger and paste it here.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard