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 and an A...
Power Automate
Answered

Apply to each and an Array

(0) ShareShare
ReportReport
Posted on by 12

Hi, 

I've got a Apply to each to delete repeated items y an array but is not working, this give me all the items, why?

nnn.jpg

Not all the items are the same in all the fields, but I want to delete all that have the field Material repeated leaving just one.

2023-10-20 10_53_46-Window.jpg

 

Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hola @zapatilla2004 !
    There is a simple way to make sure your Filter array is working as expected, that is to add a 'compose' action block just adter it and add the following WDL expressions to count nr of elements from the SP list, and nr of elements after filtering

    length(outputs('List_rows_present_in_a_table')?['body/value'])
    length(body('Filter_array'))

    Ánimo!
    ========


     

  • Verified answer
    efialttes Profile Picture
    14,756 on at

    Now, my suggestion to identify duplicated items is:
    First, build a 'Dictionary' array with all possible 'Material' column values present in the Excel table, by means of a Select action block and WDL function union(). This technique is explained here:
    https://powerusers.microsoft.com/t5/Building-Flows/Filtering-Unique-values/td-p/531930
    Next, iterate over the Dictionary elements by means of an Apply to Each:
    Inside the Apply to each, add a new 'Filter array', so you will obtain rows whose Material column value is the one from current iteration.
    Now, if you need to store the first element in an 'output' array variable,  you can append to your 'output array' variable the first element obtained by means of filtering by using first() WDL function
    Hope this helps!
    ===========

  • zapatilla2004 Profile Picture
    12 on at

    Thanks!!! it works perfectly...

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard