I have a simple app that connects to a SharePoint list, when I delete an item via the app it removes the item from the list but it doesn’t move it to the site recycle bin (it does if I delete an item in the list itself)
How can I set the item to move to the recycle bin when deleting via the app?
Solved! Go to Solution.
The short answer is no. Not to my knowledge. However, commands in PowerApps and/or Microsoft Flow can copy the existing record, create a new record in the archive list, then delete the old record in the old list. You can have either Flow or PowerApps do a verification that the record exists in both lists before deleting the old. I'm guessing that is why you dont want to do a delete. I can understand the uncomfortable feeling of having the system delete one of your reccords. The quick system check should relieve any risk from that action. It is not impossible that the record may not copy correctly just due to the occasional (more frequent than it should be) overall system problems. No check would be risky.
I do not use the workflow features in SP, so I am not sure about how to copy that historical information, or if it can be. If that is an issue, then that needs to be investigated further. I build in workflow history in my lists with approver name and approval date columns. I find that to work quite well.
So, its not posible to move the record between SP list on the same site?
Is it FLOW can do what i want?
I'm sorry, but Flow pretty much does the same thing, but with actions you can actually track if for some reason the "move" fails. It is still will do a copy, and delete. The benefit with flow is that you can also handle a document list or attachments much easier.
Unless someone else can post a way, I do not know of a single "move" command. This is actually what is going on behind the scenes in a "move" function anyway. Its just that you create the steps in a more manual way. With Flow or PA, I might even consider it one step better in that you can test that the copy was successful (automatically) before deleting the old.
I know that it used to be that SharePoint list items deleted using PowerApps did not go to the recycle bin, which was a problem but I just noticed that this is no longer the case. While in the process of building and testing a Flow to delete items (which is a real pain) I noticed that items I had deleted earlier using the app were already in the recycle bin.
Using the exact formula shown below, I removed an item from a SharePoint list in my canvas app and confirmed that it went to the site collection recycle bin and was easily and successfully restored from there. I repeated this test several times and it works as expected each time.
RemoveIf( 'GPS Goals', ID = varSelectedGoalID );
Maybe I'm the last one to know but I hope this saves someone else who lands on this thread a few minutes.
Check out the on demand sessions that are available now!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Features releasing from October 2020 through March 2021
Check out the Power Platform Community Highlights