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 / Stop Apply to each fro...
Power Automate
Unanswered

Stop Apply to each from creating a list item multiple times

(0) ShareShare
ReportReport
Posted on by 12

I am creating a flow that takes a CSV file and puts it into an array and parses out the appropriate data needed, using split, to create a new list item with the required info for each array element.  Two of the required "fields" (Rej Reason and Base Code) come from a drop-down (Lookup). The other two "fields" (Corp Entity and State) use a lookup to another SharePoint List to retrieve the required information.  For each of these four "fields" I am using Get Items to get the appropriate information based on the designated input.  Each Get Items is creating a new Apply to Each.  As a result, I believe this is what is causing me to have multiple copies of the new list item.  I only want one new item added to the list for each Array element.  I have tried multiple ways to get to this point and nothing is working.  Below is an abbreviation (non-relevant actions omitted for simplicity) of my current flow:

DLeggett_0-1716212444250.png

DLeggett_2-1716212472806.png

DLeggett_3-1716212487879.png

DLeggett_4-1716212499832.png

DLeggett_5-1716212508649.png

Any and all assistance is appreciated as I have been banging my head for over a week on this.  I am new to Power Automate but have other coding experience.  It baffles me that there is no debug feature where you can set break points and check

 

 

 

 

Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    @DLeggett It's not ideal to have a Get Items action nested inside an Apply to Each action. You want to have this action outside of your Apply to Each action. This way you only need to get your SP List items once, then use a Filter Array action to filter out the items returned.

     

    Can you create a copy of your flow and delete every action up until your Filter Array action?

    creativeopinion_0-1716219548850.png

     

    If you can click on these actions to expand and take a screenshot of your copied flow (again, there shouldn't be any actions after the Filter Array action).

     

    Tip: Instead of trying to build out your full flow and troubleshoot it after it's "complete" run tests at each stage to troubleshoot early. 

     

    In the meantime, you might find these two YT Tutorials helpful: Are you using the Microsoft Power Automate Filter Array Action wrong?

    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.

     

    1️⃣ Cross-Referencing Data

    2️⃣ Filtering by Key

    3️⃣ Substring Matching

     

    Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.

     

    IN THIS VIDEO:

     3 Ways to Use the Filter Array Action

     How to use the Scope Action to Group Actions

     How to Check the Number of Items returned from a Filter Array Action

     How to Cross-Reference Data in Excel with a SharePoint List

     How the Filter Array Action Works

     How to Access the Dynamic Content from a Filter Array Action

     How to Filter Items by a Key

     How to Filter Items by Matching a Substring

     How to Use Multiple Conditions in a Filter Array Action

     

    ---

     

    3 Mistakes YOU 🫵 are Making with the Apply to Each Action in your Microsoft Power Automate Flow

     

    In this video tutorial I’ll go over how to avoid these common mistakes when using the Apply to Each action in a Power Automate flow:

     

    1️⃣ Looping through a Single Item

    2️⃣ Creating Unnecessary Nested Loops

    3️⃣ Looping through an Unfiltered Array

     

    At the end of the video I share a few helpful insights when it comes to using the Apply to Each action in your flow.

     

    IN THIS VIDEO:

     How to avoid the Apply to Each action with a single item array

     How to use the item() function to access dynamic content in an array

     How to prevent unnecessary nested Apply to Each action loops

     How to use the Select action

     How to convert an array to a string with the Select action

    How to use the Filter Query field

     How to count the number of items in an array

     How to use a condition control

     How to use the concurrency control

     How to set a top count

     How to use Compose actions for troubleshooting

     

    Hope this helps!

    If I helped you solve your problem—please mark my post as a solution .
    Consider giving me a 👍 if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
  • DLeggett Profile Picture
    12 on at

    Thank you for your reply.  Let me watch your videos and review your purposed approach and see if it will work.  Stay tuned and I appreciate your assistance.

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