Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Filter Array Working but not working Confused :(

(0) ShareShare
ReportReport
Posted on by 1,151

HI Everyone 🙂
I have a weird one that my brain is now numb from!
I am building a flow to  archive calendar events for the previous 3 month in to a Sharepoint list which after item created will be deleted from the calendar.
My flow structure is

Recurrence as trigger then

gazzo1967_0-1706268158056.pnggazzo1967_1-1706268229215.png

To here above its returning data

From below onwards no data being passed
gazzo1967_2-1706268293681.pnggazzo1967_3-1706268333866.png

What am I missing? 😞
Regards Gary

  • Verified answer
    eliotcole Profile Picture
    4,243 Super User 2025 Season 1 on at
    Re: Filter Array Working but not working Confused :(

    Here you go, @gazzo1967, this should get you accurate results:

    Flow - Full.png

     

    Essentially just using the built in 'Filter Query' on the Get items connector will accurately filter the dates.

     

    In my example above I am running it on the default 'Events' list in my site, to get that particular list you need to type it in as a custom value as you cannot select it.

     

    That and using the 'Subtract from time' will ensure that it only returns items that are older than 3 months ago.

  • eliotcole Profile Picture
    4,243 Super User 2025 Season 1 on at
    Re: Filter Array Working but not working Confused :(

    There's a couple of things that I'd maybe change for efficiency, here, @gazzo1967 ... but I don't have the time to address those right now.

     

    I do think one thing that you could change immediately would be to use the 'Subtract from time' action from the 'Date Time' connector.

     

    There is a chance that your time is maybe not subtracting correctly ... just a chance, though.

     

    I think you would also want your Filter to be 'less than' ... no? Plus, if you really want push that, you could wrap each time with trim() in the expression builder.

     

    ((( I'm penning a 'proper' answer for you, too )))

  • rzaneti Profile Picture
    4,096 Super User 2025 Season 1 on at
    Re: Filter Array Working but not working Confused :(

    Hi @gazzo1967 ,

     

    Just to confirm that I understood it correctly: your 'Filter array' action is returning a non-empty array, but when you pass it to the 'Apply to each 2' as dynamic content, no items are found to be looped?

    If this is the case, could you please share the raw outputs from your 'Filter array' action? By doing that, we will be able to identify if is there any errors in the JSON structure of your action outputs.

     

    If you don't know how to get access to the raw outputs, refer to the steps described in this article: http://digitalmill.net/2023/06/29/how-to-access-the-raw-outputs-in-power-automate/ 

     

    Make sure to remove any sensitive content before sharing the outputs 🙂 

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1