cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

SharePoint last item of list

Helllo,

i need some help please,i am trying to get the ID of the last item in a SharePoint list? is there any function to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@Afifkr:

 

You can use the SharePoint Get Items action.  Configure the action (as in the screen shot below) to return just 1 item and to order the results by ID in descending order.  You'll need to loop through the items returned by Get Items but there will be only one item returned.

 

The Flow below runs successfully:

  OrderBy.jpg

 

 

I would like to add a word of caution that this technique is not recommended in an environment where there is a high volume of new items being created in a SharePoint list at any given time.

 

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

View solution in original post

1 REPLY 1
Super User III
Super User III

@Afifkr:

 

You can use the SharePoint Get Items action.  Configure the action (as in the screen shot below) to return just 1 item and to order the results by ID in descending order.  You'll need to loop through the items returned by Get Items but there will be only one item returned.

 

The Flow below runs successfully:

  OrderBy.jpg

 

 

I would like to add a word of caution that this technique is not recommended in an environment where there is a high volume of new items being created in a SharePoint list at any given time.

 

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

View solution in original post

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Users online (7,260)