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 / Dataverse 'Apply to Ea...
Power Automate
Answered

Dataverse 'Apply to Each' is updating more records than expected

(0) ShareShare
ReportReport
Posted on by 11

I am new to Power Automate and I am trying to understand what I am doing wrong with this flow.

 

I have a list from Dataverse, I am applying a Filter array that is removing records that have a status of 'Closed' (custom field). I can see in the INPUTS that there is a record with a status of 'Closed'... this record is correctly filtered and is not in the OUTPUT.

 

The OUTPUT contains 7 records, however the 'Apply to Each' is receiving 8 records, including the one that was filtered out in the prior step.

 

I am not sure what I am missing here. 

 

vtchris_0-1671212123466.png

 

Categories:
I have the same question (0)
  • shaboo Profile Picture
    65 on at

    Hiya,

     

    Can you create same filter on a view and see how many records you are retrieving, it will be the same filter it uses on flow. Download and view XML and compare the power automate filter.

     

    If there will be issue what you see from view and power automate the number of records resulting different when if the filter is same that will be a bug on Microsoft end that is unlikely happen.

     

    Hope this is helpful.

     

    Regards

    Sandeep

  • 404 Not Found Profile Picture
    11 on at

    Thanks for your reply... as I continue to dig I think my issue is somewhere in the Apply to Each... I can see that when I pick the value, it is referring to the original list, and not the output from the filter...

    But if I try to pick one of the options under the filter it errors out as the step is receiving an object and not the array. I think I am missing some sort of intermediary step...

    Ugh, this would be like a 15 minute stored procedure... 

     

    vtchris_0-1671221770601.png

     

  • Verified answer
    v-dezhili-msft Profile Picture
    Microsoft Employee on at

    Hi @vtchris 

     

    Please try:

    vdezhilimsft_0-1671417055219.png

     

    vdezhilimsft_1-1671417055220.png

     

    vdezhilimsft_2-1671417055221.png

     

    or
     
    vdezhilimsft_3-1671417055222.png

     

    vdezhilimsft_4-1671417055223.png

    Best Regards,

    Dezhi

  • Verified answer
    404 Not Found Profile Picture
    11 on at

    Thanks for your reply!

     

    I did try your first example previously... this errored out when I tried to update the row because the step was receiving an object and not an array. 

     

    For the second example, I am using the filter rows in the 'List Rows' to remove records with nulls which reduces the most records. Unfortunately I was not able to find a way to apply multiple filters at this stage, and so I ended up with the 'Filter array' step.

     

    Ultimately I solved it by using a Condition and only update the records that don't contain 'Closed' in the status. It seems silly to have to go through each record, but I did not discover a way to implement the 'Filter array' WITH the 'Update row'. Now I need to look into paging as either way this is going to get more than 5,000 records when it is in the prod environment.

     

    vtchris_0-1671457057804.png

    I appreciate the dialogue on this issue from the community! I wish I could have found a more efficient solution.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard