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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to pull only the m...
Power Automate
Unanswered

How to pull only the most recent items in a SP List based on Time Received

(1) ShareShare
ReportReport
Posted on by 94

Hi,

 

I have a SharePoint List which cumulates ticket updates for incidents. I need to create a Flow that send an email when an incident has breached the next update due time.  The problem i have is that there will often be multiple rows in the list for the same incidents (older updates).  I need the flow to only pick out the current 'Next update Due' for each incident. 

 

Example below in a table (made up). Highlighted in yellow would be the most recently received updates. Those are the ones i need and the rest can be ignored.  Table ordered newest to oldest.

 

Epidot_0-1676283454831.png

 

 

 

 

My flow would be

 

1) Get SP list items

2)  Get newest update for each incident only

3) condition (If UTCnow is less than 'Next Update Due' . Send email

 

Any help appreciated.

 

Categories:
I have the same question (0)
  • Unknown geen idee Profile Picture
    1,757 on at

    Dear Epidot,

     

    Seems like you need some kind of embedded filter or double level filter or ... not sure what the right term for this is. In any case, I have yet to see this is in Power Automate actions. The standard filter options in actions seem kinda limited, mostly it does not even allow boolean operators (AND, OR, ...).

     

    Can't you just filter the array and then filter again? I know it feels kinda rough, but if it works, it works ... and speed should not be an issue if it is just filters.

    Something like:

    1. Get the overdue date items.
    2. Filter array by incident number.
    3. Sort by newest date.
    4. Get the first item only. (first()).

    Maybe there is a double layer filter possible in the 'Select array' function, but I have yet to see it. Would be interested if someone knows this though.

     

    Happy flowing,

    Koen

  • Epidot Profile Picture
    94 on at

     

    Thanks,

     

    Bit stuck after this bit. I've got items that are breached and i've ordered by newest to oldest.

     

     

    Epidot_1-1676303164657.png

     

    Unsure how to then pick out the first of each incident Number..

     

  • Han2 Profile Picture
    10 on at
    Tom Riha's solution "How to get only the last item from a SharePoint list in Power Automate" might get you there, or a step in the right direction at least.  He orders the hits by ID and takes the top hit, but I reckon you could order it by the modified date instead.
  • lbendlin Profile Picture
    8,474 Super User 2025 Season 2 on at
    Run your own ODATA query with grouping.
     
     
    Example 2.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard