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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Remove sharepoint list...
Power Apps
Unanswered

Remove sharepoint list item and store the recycle bin item id

(0) ShareShare
ReportReport
Posted on by 30

Background

The ultimate requirement is an administrator function within an app to clear down a set of sharepoint lists that the wider app populates.  We also want these to be restorable in the case of admin-users doing this when not appropriate.  The happy part of where I am at with this is I have something working (on the face of it).  This dumps the contents of each list's items to a spreadsheet.  A restore function reads these excel rows and recreates the list items. 

They look good but of course the metadata is different.  Particularly the 'Created By' field now takes the value of the administrator who triggered the restore, and not the real user who's use of the app created the original record.  This is a problem because one of the lists contains sensitive data.  So it is protected so that each user can only access the records they have created.  The change in the 'Created By' settings means the wider app no longer functions correctly for non-admin users after a dump, clear and restore.  

Cutting to the chase

I want the clear function to capture the id's of the recycle bin items it creates.  A restore function could then simply use _api/web/recyclebin('<recycle bin item id>')/restore() to restore the item.  I would need no dump function before the clear.  But the method I use - the delete item task in power automate - does not seem to return this.  Is there a way I can capture this from the delete? 

 

Any help gratefully received. 

Categories:

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 232 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 202 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard