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 / Help with Filter Array...
Power Automate
Answered

Help with Filter Array for Delete items

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

I am trying to test a comparison for a Delete item flow using a filter array. I don't believe it is working properly, as I am not getting the results I think I should be getting.

My assumption is the array return should only include Jack Frost, Mary Appleton, Merv Gruper, Sammy Hammer - from the Test Data Transfer List, as they don't appear on the MWEmployeeList.

But my results are not showing my assumption, rather all the names from the MWEmployeeList.

Phineas_1-1685474061078.png

 

Phineas_2-1685474134946.png


Apply to each Value ('Get items' Employee_List body/value)
Filter Array Value ('Get items2' Transfer_List body/value)
FullName (item()?['FullName'] is not equal to FullName items ('Apply to each') ?['Title'] (which is FullName)

Phineas_0-1685474000318.png

Phineas_3-1685474745011.png

 

Categories:
I have the same question (0)
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    The flow doesn't make sense to me with the Apply to Each and then a Filter Array.

     

    You are saying For Each item in the Employee List, I want to Filter the Transfer List to show all items that do not equal the item name from Employee List.


    So the first Apply to Each will be using "Curtis T", and the Filter Array will have all of the Transfer List names that do not equal "Curtis T".

     

    The second Apply to Each will be using "Bo Regard", and the Filter Array will have all of the Transfer List names that do not equal "Bo Regard". (It will still include "Curtis T" because that filter array is on the previous loop.) The only name that will be filtered out is "Bo Regard".

     

    The third Apply to Each will be using "Julie DeLaw", and the Filter Array will have all of the Transfer List names that do not equal "Julie DeLaw". (It will still include "Curtis T" and "Bo Regard" because those filter array is on the previous loop.) The only name that will be missing is "Julie DeLaw".

     

    Each Apply to Each loop is it's own flow. The filter array doesn't carry over actions from the previous Apply to Each.

     

    Which list are you trying to Delete items from? 

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    I want to delete items from the Test List. the MWEmployee is the source data. If the name is not on MWEmployee delete it from Test List.

  • Verified answer
    wskinnermctc Profile Picture
    6,519 Moderator on at

    Here are the steps that will delete the items from your Test List.

     

    SP Filter Delete Items Not MatchedSP Filter Delete Items Not Matched

     

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Great.

    Now my source data (SPList1) has 604 items and my updated data (SPLIst2) has 582 items.

    This means the delete worked, however there are new items in SPList1 that need to be added to SPList2.

    How and where do I add a 'Create item' to account for and make copies of the new items from SPList1 to SPList2?

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    It is basically the same process except opposite when it comes to the Select and Filter Array. I've added the steps to the previous flow.

     

    Add New ItemsAdd New Items

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Ok.

    Building it right now.

    Question; How do I filter OUT all blanks coming in from the Get items and Get items 2?

    The data source flow (source is and Excel workbook with a Table, created by someone else) has a Table range of A:O rather that A1:O (whatever the line number - around 650), and is creating hundreds of blanks lines in my SPList2 that I don't want or need.

    Can I build and expression in the Get items filter query that will eliminate these blanks?

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    You need to type in the column name and that it is not equal to '' (two single ' quotes that identify no text)

     

    Type this below in your filter and replace the column name. If your column name has spaces or special characters, it probably won't work properly.

     

    ColumnName ne ''

     

    ExcelExcel

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    My portion and my flow are not with the Excel file.

    I'm working with the SPList.

    There are currently 602 items in the source SPList1 and 582 in the destination SPList2.

    One of the columns in the source SPList1 that has blanks is 'Title'.

    I put - Title ne '' in the filter query of the Get items (the source data). Should this eliminate the blanks? 

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Content removed.

  • Phineas Profile Picture
    5,325 Super User 2025 Season 2 on at

    Back to this 'Create items' component; I have pre-existing data in SPList2, where the new items are to be created.

    I don't want those 'existing' items overwritten or changed as a result of the 'Create items'.

    How do I create the new items where there are existing items?

    Am I correct in assuming I need a Condition that compares the Output of Select1 to Select2, and where Select1 doesn't exist create the item in SPList2? This will leave existing as is and ONLY create new items?

    Phineas_2-1685633589426.png

     

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