cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

delete all list items

Dear community,

 

I have created a SharePoint List where users can register themself as a visitor through a power app. 
At the end of the day I would like to clean this list by using a microsoft flow.

I already found the schedule function to trigger the flow at 0:00am. But there is no function to delete all the list items in a sharepoint list. Unfortunately  I could only find to delete one item, that needs to be specified as an unique id.

 

Does anyone now a quick solution to this? Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Anonymous
Not applicable

I have found the solution. I combined the "get items" and "apply each" operator.
For people who are interested, see https://docs.microsoft.com/en-us/flow/apply-to-each.

Here is an overview of my solution

 

msflow.JPG

View solution in original post

7 REPLIES 7
Highlighted
Anonymous
Not applicable

I have found the solution. I combined the "get items" and "apply each" operator.
For people who are interested, see https://docs.microsoft.com/en-us/flow/apply-to-each.

Here is an overview of my solution

 

msflow.JPG

View solution in original post

Highlighted

Hi. I just tried your method. It is sporadically deleting items and misses many.  Strange.

Highlighted

All,

 

I need some help please.  I have unsubscribe email account that by its nature will trigger a flow that I want to delete that persons data from some SharePoint lists.  I have limited knowledge of the delete items action in o365 SharePoint.  What do I need to do to make the flow work below? 

 

 Unsubscribe.png

 

The list has multiple fields and all should be deleted as part of the process.

 

Can someone please give me some guidance.

 

Regards

 

Andrew

Highlighted
Frequent Visitor

in the Get Items section of your flow, try setting the number really high. The "Default" says it will get all items, however; it doesn't work. Instead set a item limit well beyond the total in the list to get a more consistent result.
Highlighted

Same issue here.

 

Even if I try to select all items in SharePoint page and I click Delete. It won't delete everything....

 

 

Highlighted

Just to clarify. The field is Top Count:

Untitled.png

Highlighted

You also need to switch on pagination in the action's settings (right clip on the ellipse) or it will only pick up the first 100 items

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (6,589)