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

Community site session details

Session Id : 5QFMG+I7DCVgr0yjDqvB1F
Power Automate - Building Flows
Answered

Find the latest modified date from a specific file (within 6 days)

Like (0) ShareShare
ReportReport
Posted on 12 Jun 2024 18:20:53 by 10

 

I need to find the specific file latest modified witin 6 days. I have over 20 files named the same but in different folders each time.
And finding the latest one is necessary.
But i always get an error.
Could i please get help on how to write the expression ?
Im Sure its gonna be a simple solution
 
lessOrEquals(item()?['Modified'], 5)
Unable to process template language expressions in action 'Get_Files_(Properties_only)' inputs at line '0' and column '0': 'The template language function 'lessOrEquals' expects all of its parameters to be either integer or decimal numbers. Found invalid parameter types: 'Null'.'.

Nutela_0-1718216155862.png

I have the same question (0)
  • Nutela Profile Picture
    10 on 13 Jun 2024 at 16:58:37
    Re: Find the latest modified date from a specific file (within 6 days)

     this is great !!

     

    Thank you  !!

  • Verified answer
    v-yetonggu-msft Profile Picture
    on 13 Jun 2024 at 01:29:06
    Re: Find the latest modified date from a specific file (within 6 days)

    Hi @Nutela ,

    Please check this test:

    We first get the files from the past six days and sort them in descending order according to the modified column. Then take the top one to get the most recently modified files.

    vyetonggumsft_0-1718248220926.png

     

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

     

    Best Regards,

    Sunshine Gu

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 783 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 515 Moderator

#3
trice602 Profile Picture

trice602 299 Super User 2025 Season 2

Last 30 days Overall leaderboard