web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter array doesn't w...
Power Automate
Answered

Filter array doesn't work for document library?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

 

Categories:
I have the same question (0)
  • Verified answer
    v-LilyW-msft Profile Picture
    Microsoft Employee on at

    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.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

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

    confusedintern_0-1626672972034.png

     

    Thanks again!

  • v-LilyW-msft Profile Picture
    Microsoft Employee on at

    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
    Microsoft Employee on at

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

     

    confusedintern_0-1626676973480.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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard