cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sticks1972
Level: Powered On

MS Flow - Filter A list to Show only First Item

Hello,

I would like to use a flow to populate a SharePoint list with only the latest record for each unique ID from another list.

 

List 1 (All Records)

Unique ID       Record Date   

1                     1/1/2010

1                     1/1/2015

2                     6/1/2011

2                     1/1/2010

3                     3/1/2011

3                     5/1/2010

 

Use MS FLow to Create a New Table with the most recent Record date for each Unique ID.  Example Output - List 2:

Unique ID       Record Date   

1                     1/1/2015

2                     6/1/2011

3                     3/1/2011

 

I understand how to access data from List 1, and how to write records.  My issue is figuring out how to only write the latest record to List 2

2 REPLIES 2
Super User
Super User

Re: MS Flow - Filter A list to Show only First Item

@Sticks1972 :

 

Here is an easy way to get the last list item.

  1. Configure a Get Items action to sort the list items by ID in a descending order
  2. Configure the Get items to return just 1 item

The screen shot below if for a Flow that runs successfully and returns just the last item in a list:

LastItem.jpg

 

If this addresses your issue, please mark your post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Sticks1972
Level: Powered On

Re: MS Flow - Filter A list to Show only First Item

Scott,

Your solution gives the last item in the list, but not the last item specific to each unique ID.  I'm essentially trying to create a loop to create a list that is Grouped by ID.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 322 members 4,465 guests
Please welcome our newest community members: