Skip to main content
Community site session details

Community site session details

Session Id : sXLIU3j7TF3JzU0OuQj/19
Power Automate - Using Flows
Answered

Filter array doesn't work for document library?

Like (0) ShareShare
ReportReport
Posted on 19 Jul 2021 02:07:34 by

Hi guys!

 

I'm trying to create an email notification that refreshes and sends every morning and will tell an individual when a safety data sheet (SDS) has expired.

 

So far this is what I have: 

confusedintern_0-1626660105593.png

confusedintern_1-1626660144993.png

Under filter array, this is what I've input:

formatDateTime(item()?['SDS_x0020_Expiry_x0020_Date'], 'yyyy-MM-dd') is equal to or less than 
addDays(utcNow(), 1, 'yyyy-MM-dd')
 
The flow can run, but when it does, the table shown in the email includes even the SDS that has NOT expired, so I guess the filter array didn't work?? I'm not so sure, but here is how the email looks like:
confusedintern_2-1626660273174.png

The one i arrowed is not supposed to be there 😞 

 

Sorry if this question is dumb, its my first time trying out flow automate!! Thanks for helping in advance!!

 

  • Community Power Platform Member Profile Picture
    on 19 Jul 2021 at 06:43:01
    Re: Filter array doesn't work for document library?

    Yes! that works as well. Thank you again!!!

     

    confusedintern_0-1626676973480.png

     

  • v-LilyW-msft Profile Picture
    on 19 Jul 2021 at 05:55:12
    Re: Filter array doesn't work for document library?

    Hi @Anonymous 

    Do you only want to display the date at expiry, not including the time?

    If yes, you can change the Select action as below:

    Expression:formatDateTime(item()?['SDSExpiryDate'], 'yyyy-MM-dd')

    vLilyWmsft_0-1626674029796.png

    Best Regards

  • Community Power Platform Member Profile Picture
    on 19 Jul 2021 at 05:36:22
    Re: Filter array doesn't work for document library?

    Thank you so much! This solution 100% works! This is how it looks like now:

    confusedintern_0-1626672972034.png

     

    Thanks again!

  • Verified answer
    v-LilyW-msft Profile Picture
    on 19 Jul 2021 at 03:52:12
    Re: Filter array doesn't work for document library?

    Hi @Anonymous 

    The From value of Create HTML table should be filled with the body of the filter array.

    vLilyWmsft_0-1626665966303.png

    I created a simple Flow, you can refer to as below:

    This is my file library:

    vLilyWmsft_1-1626666112694.png

    Flow in details:

    vLilyWmsft_3-1626666165762.png

    Expression:formatDateTime(item()?['SDSExpiryDate'],'yyyy-MM-dd')

    Expression:addDays(utcNow(),-1,'yyyy-MM-dd')

    vLilyWmsft_4-1626666184713.png

    vLilyWmsft_6-1626666540725.png

    vLilyWmsft_7-1626666591643.png

    After flow runs, I will receive notification as below:

    vLilyWmsft_8-1626666662612.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Featured topics

Restore a deleted flow
Loading started
Loading complete