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 / Delete the last row on...
Power Automate
Unanswered

Delete the last row on SP list

(0) ShareShare
ReportReport
Posted on by 22

Hi, 

I want to delete the last row on SP list.

Is it possible?

Thanks

I have the same question (0)
  • Verified answer
    manuelstgomes Profile Picture
    6,625 on at

    HI @John_alcan 

     

    There are two ways to do this:

    1. If the last is based on something you can sort, then you can use the Order By and then limit to just one record. Then delete it.

    2. If not, you can fetch the items and have a condition that checks if the current item is the last one. To do this, define a variable and increment it each time the Loop runs. In each compare, if the variable is lower than the length. If it is continue, if not delete.

    2020-08-19 10_43_31-Create your flow _ Power Automate.png

     

    length(outputs('Get_items')?['body/value'])

     

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

    Cheers
    Manuel

  • Verified answer
    Mrmus Profile Picture
    11 on at

    you can use length property to get length.

    i.e length(body('Get_Item')).

    this will give length and after we need to minus by -1 form length to get item

    i.e item(body('Get_Item')['Value'][length(body('Get_Item'))-1]

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard