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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

Apply to each running more and more each time

(0) ShareShare
ReportReport
Posted on by 9

Hi, so I have created a flow with the aim, after a form has been submitted the flow will scan an excel sheet and if there is already data matching a value then it will only update the row rather than creating a new row and if the data did not exist it will add a new row to the table. I managed to run this successfully on my first try with the row update but I try to test with no previous information in the table the flow failed and I realised I had an incorrect field.

I fixed this and changed the flow to suit more correctly but now the apply to each will run several times adding a new duplicate rows and adding to an existing row if the information is already there.

The duplicate rows will also create if there is no information already present in the table.

 

I am rather new to power automate and it may be something very obvious that I have done to replicate the apply to each as in principle the flow works as intended but the excess data being created will eventually be a problem when  implement the full flow.

Likewise if data is present in the flow the apply to each running several times with one of the runs is correct, where it updates the row rather than adding a row but the other 8 runs do not update and add 8 dublicate rows.

 

Any help will be greatly appreciated and any more information I will try my best and update you.

Thanks

Ben

Flow_Run_3.png
Flow_Run_1.png
Flow_Run_2.png
Categories:
  • Verified answer
    v-chengfen-msft Profile Picture
    Microsoft Employee on at

    Hi @bengerry77 ,

    The cause of this problem is:
    1. The data submitted by the form will be compared with all the data in excel
    2. For each comparison, update if they are the same, and create a new one if they are different.
    This results in the creation of duplicate data

     

    Please try to use filter query to filter excel,
    If there is such a record, the length of the return value is greater than 0, then update this record
    If there is no record, the return value length is equal to 0, then create a new record

    Here is a test for your reference:

    Here is excel:

    vchengfenmsft_4-1670467603622.png

     

    Here is flow:

    vchengfenmsft_2-1670467465586.png

    vchengfenmsft_3-1670467502819.png

    Here is result:

     

    Add a new row:

    vchengfenmsft_5-1670467650257.png

    vchengfenmsft_6-1670467675005.png

     

    Update a row:

    vchengfenmsft_7-1670467741666.png

    vchengfenmsft_8-1670467786641.png

     

     

     

    Best Regards

    Cheng Feng

     

     

     

  • bengerry77 Profile Picture
    9 on at

    Hi Cheng Feng, thanks very much for the insight, I will try this now this morning and report back to you.

    Cheers

    Ben

  • bengerry77 Profile Picture
    9 on at

    Hi Cheng, once I modified the cells to suit mine it worked like a charm.

    Thanks again, I now even have a better understanding of how its working and the different opperators I can use.

    Thanks

    Ben

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 389

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard