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 Get file data b...
Power Automate
Unanswered

Filter Get file data based on condition date

(0) ShareShare
ReportReport
Posted on by 24

For some reason my condition isn't working.  I have a date column in my document library labeled ExpirationDate and I'm trying to filter the output before it gets to the Create an HTML table step.  Essentially It's not filtering anything, it's creating a table with every entry from the document library in it, regardless of the expiration date.   I want the table to only show expired files and nothing else.

2020-09-03_01-17-51.png

Categories:
I have the same question (0)
  • sudharsan1985 Profile Picture
    1,325 on at

    Hi @Joesstlouis1 

    Can you please use the below in the 'Condition' action instead of using 'utcnow()' alone and try

    addDays(utcNow(), 0, 'yyyy-MM-dd')

     

    Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
    -Sudharsan K...

  • Joesstlouis1 Profile Picture
    24 on at

    I'm using the above with UTCNOW and it's only calculating against the date the flow was created, not the current date that the flow is being run.

     

    2020-09-05_10-55-43.png

  • sudharsan1985 Profile Picture
    1,325 on at

    Hi @Joesstlouis1 

    I am not sure why you are using 'Apply to each' and then 'Condition' inside that, instead you can use the 'Filter Query' property of the 'Get Files (properties only)' action to filter the expired documents. I just ran a sample scenario and it worked fine.

    1. Document library with the field named 'Expiry Data (Internal Name as 'ExpiryDate')'.

    2. Uploaded 2 documents as shown below

    sudharsan1985_0-1599364293071.png

    3. One document has a past date and another as a future date as an expiry date.

    4. Get Files action with the filter query shown below

    sudharsan1985_1-1599364426564.png

    5. The flow returns only one result as shown below

    sudharsan1985_2-1599364565601.png

    Note: For security reasons, I had cut down the tenant name in the screenshots.

     

    I am sure the condition should work for the actions inside the 'Apply to each' too.

     

    Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
    -Sudharsan K...

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard