Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Filter Array Output not as Expected

(1) ShareShare
ReportReport
Posted on by 6
Hello,

I'm trying to make a flow where Power Automate looks for files in a Sharepoint Folder, and adds each file name to a text column in a Sharepoint List. I have that part working, but I'm having a hard time building some logic into the flow so that Power Automate does not keep adding duplicate rows to the list. 

I'm using the Filter array action to try and identify and filter out duplicates before adding rows to the Sharepoint List. Filter array input is the body/value of Sharepoint List and the filter query is the column from Sharepoint List is equal to Name from Sharepoint Folder. However, it does not appear that the Filter array is providing any sort of output. I believe it should be since there are already values in the Sharepoint List that match the file names in the Sharepoint Folder.

Can anybody help? I'm fairly new to Power Automate so any assistance is appreciated.
 
 
 
 
 
 
 
 
  • creativeopinion Profile Picture
    creativeopinion 10,056 on at
    Filter Array Output not as Expected
    To troubleshoot this issue you need to verify that the dynamic content you are comparing in the Filter Array action is outputting what you are expecting.
     
    Insert a Compose action before the Filter Array action. Insert the dynamic content for the Folder Name.
     
    Run a test and review the outputs. Since you are using the is equal to operator in your Filter Array action, it is looking for an EXACT MATCH. Share a screenshot of the output of your compose action.
     
     
    I cover how to do that in the first part of this YT Tutorial:

    In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!

    IN THIS VIDEO:
    ✓ How to troubleshoot a false Condition action result
    ✓ How to get dynamic content when it isn’t selectable from the list of dynamic content
    ✓ How to troubleshoot an Apply to Each action that isn’t looping through
    ✓ How to troubleshoot a skipped Apply to Each action
    ✓ How to troubleshoot a Filter Query
    ✓ How to use a SharePoint yes/no column in a Filter Query
    ✓ How to use Compose actions to troubleshoot a Power Automate flow
    ✓ How to troubleshoot multiple emails being sent
    ✓ How to troubleshoot multiple Teams messages being sent
  • DK-10011705-0 Profile Picture
    DK-10011705-0 6 on at
    Filter Array Output not as Expected
    @bscarlavai33 - thanks for the followup. Below is a screenshot of the output. The weird thing is that Power Automate is first creating the value ("PQS File Name") in the list based off of the file name (Name from List Folder) from the folder. But when it runs again and compares the "PQS File Name" from the list against the file names from the folder, it doesn't seem to be recognizing that there's a match ..even though Power Automate is what created the list name in the first place. Perhaps there's some hidden formatting or something I'm missing?
     
     
     
     
  • DK-10011705-0 Profile Picture
    DK-10011705-0 6 on at
    Filter Array Output not as Expected
    @creativeopinion  - thank you for the reply and for providing those resources, I'll be sure to check those out. Below are the flow screenshots from the old designer view.
     
     
     
     
     
  • bscarlavai33 Profile Picture
    bscarlavai33 513 on at
    Filter Array Output not as Expected
    @DK-10011705-0 - can you show the output of the List folder action? Maybe it isn't exactly matching that PQSFileName property?
  • creativeopinion Profile Picture
    creativeopinion 10,056 on at
    Filter Array Output not as Expected
    @DK-10011705-0 
    It's hard to offer any recommendations without seeing your full flow and the logic behind it. Toggle off the New Designer and click each action to expand it. Upload a screenshot of your flow in edit mode.
     
    The equals to operator looks for an EXACT match. If the Filter Array action isn't outputting anything it's because the condition(s) aren't met. I've linked a few tutorials below that you might be interested in.
     
    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

    In this tutorial—I’m going to show you a quicker way to get the dynamic content from your Filter Array action—and it doesn’t require writing an expression.
    IN THIS VIDEO:

    ✓ How to Loop Through Filter Array Results in Power Automate
    ✓ Using Apply to Each with Filtered Arrays
    ✓ The Easiest Way to Access Dynamic Content from Filter Array
    ✓ Fixing Nested Apply to Each Actions
    ✓ When to Use Value vs. Body Dynamic Content
    ✓ Simplifying Power Automate Flows with Filter Array
    ✓ Troubleshooting Filter Array and Apply to Each Issues

    ---

    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
     
    ---

    In this Power Automate tutorial, I explore 5 frequently asked questions that pop up when troubleshooting a flow. If you’d like to to level up your Power Automate flow skills and learn how to troubleshoot your Power Automate flow—this tutorial is for you!

    IN THIS VIDEO:
    ✓ How to troubleshoot a false Condition action result
    ✓ How to get dynamic content when it isn’t selectable from the list of dynamic content
    ✓ How to troubleshoot an Apply to Each action that isn’t looping through
    ✓ How to troubleshoot a skipped Apply to Each action
    ✓ How to troubleshoot a Filter Query
    ✓ How to use a SharePoint yes/no column in a Filter Query
    ✓ How to use Compose actions to troubleshoot a Power Automate flow
    ✓ How to troubleshoot multiple emails being sent
    ✓ How to troubleshoot multiple Teams messages being sent
     
     
    Hope this helps!

    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
  • DK-10011705-0 Profile Picture
    DK-10011705-0 6 on at
    Filter Array Output not as Expected
     
    The value "Name" on the right side of filter action is the Name field from the "List folder" action.
  • bscarlavai33 Profile Picture
    bscarlavai33 513 on at
    Filter Array Output not as Expected
    What is the value of "Name" on the right side of the Filter action? 

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard