Skip to main content

Notifications

Power Automate - Building Flows
Answered

Filter Array returning empty

Posted on by 66
Hi, 
 
I need some help knowing what item to put in a filter array. The array I'm filtering is an initialise variable, I'm using append to array to put data in it. I can't get it to filter what I want. I'm sure I just don't know what function to enter in the filter query. So I shall seek expertise from people who are smarter than me. 
 
This is the array I'm filtering
 
This is what is appended to it. I've checked and it is returning the items I want. 
 
 
 
This is the filter
 
 
This is field_1
 
 
And this is from the body of emails apended to the array
 
 
What function do I need to filter it so it gives me the email with field_1 mentioned in it?
 
Many thanks,
Lauren
 
  • Verified answer
    LB-20090315-0 Profile Picture
    LB-20090315-0 66 on at
    Filter Array returning empty
     
    thanks for your advice. I've actually adjusted the flow now. I've included a value within the append to array that I can reference. 
     
    What we are trying to achieve is quite complex. Essentially, we have a list on sharepoint. Once a week, we need to send all the data from sharepoint in a table to our contractors. However, we also need to include attachments (different attachment for each email) and we have to forward a corresponding email that we receive. 
     
    There is a code number that features across all of these, it's how we organise the sharepoint list, the code is referenced in the email and in the attachments, which all need to go to different places. So, the flow needs to get the items from sharepoint that need to go out that week, the corresponding email for each list item and the corresponding documents from each list item and send them all in one email to the corresponding contractor. 
     
    Not to worry, I've found a work around now. Thanks for your help and your videos were interesting I look forward to learning more. 
     
    Thank you,
    Lauren
  • Verified answer
    creativeopinion Profile Picture
    creativeopinion 9,915 on at
    Filter Array returning empty
    The logic of your flow needs to be adjusted. You have quite a few Apply to Each actions and some of them look like they are in the root of the flow which means that they are all running separately from each other. It's unclear as to what you are trying to achieve besides getting the attachments from your SP list items. 
     
    I don't understand what your are using the Filter Array action for. The more information you can provide on your requirements the easier it will be to help you troubleshoot your issue.
     
    In the meantime, you might be interested in this YT Tutorial: 
     
    In this Microsoft Power Automate tutorial, I’ll cover how to create a Power Automate flow to send SharePoint list attachments in an email. This flow will check the SharePoint list to see if an item is marked as Ready to Send and has attachments. I will also cover how to combine multiple attachments to send in a single email.
     
    IN THIS VIDEO:
    ✓ How to attach a single SharePoint list attachment to an email
    ✓ How to use the Filter Query to Filter SharePoint List Items by a Single Choice Column
    ✓ How to use the Filter Array action to Filter SharePoint List Items that have an Attachment
    ✓ How to use turn on Pagination and Set a Threshold in the Get Items action
    ✓ How to us the Top Count field in the Get Items action
    ✓ How to use the Get Attachments Action
    ✓ How to avoid the Apply to Each Action
    ✓ How to use the Get File Content Action
    ✓ How to Edit an Expression
    ✓ How to use the Compose Action
    ✓ How to Get Multiple SharePoint Attachments
    ✓ How to use the Append to Array Variable Action
  • LB-20090315-0 Profile Picture
    LB-20090315-0 66 on at
    Filter Array returning empty
     
    As requested here is the full flow without new designer on,
     
  • creativeopinion Profile Picture
    creativeopinion 9,915 on at
    Filter Array returning empty
    Can you toggle off the New Designer and click each action to expand it and upload a screenshot of your flow in edit mode.
     
    In the meantime, you may be interested in these YT Tutorials linked below:
     
    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
     
    ---
    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
     
     
     
    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

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard