cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PeKi72
Post Patron
Post Patron

Delete alle the rows of Sharepoint list where a column called UID has more than 5 characters.

Hi, 

Is it possible to delete alle the rows of a SP-list where a column called UID has more than 5 characters?

 

Gr. P

1 ACCEPTED SOLUTION

Accepted Solutions
Rhiassuring
Super User
Super User

Hi there, 

 

Totally!

 

1) Use the SharePoint action called Get Items

2) Use the Filter Array action, in the "Choose a value" field, use an expression to say

length(string(item()?['UID'])) is greater than 5
Rhiassuring_1-1669938357330.png

 

3) We're going to run this once and copy the output from the Filter Array action, and paste it into the Parse JSON action. Point the Content at your Filter Array body, and then use the Generate Schema - you can paste the output from the Filter Array there.
 
4) Then you can use the Delete Item, and point it at the Parse JSON output of "ID". It'll only bring the ones from the Filter Array earlier, so you know they'll be the ones with more than 5 characters. It will automatically become an Apply to Each.
 
Rhiassuring_2-1669938629350.png

 

 
 

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



View solution in original post

1 REPLY 1
Rhiassuring
Super User
Super User

Hi there, 

 

Totally!

 

1) Use the SharePoint action called Get Items

2) Use the Filter Array action, in the "Choose a value" field, use an expression to say

length(string(item()?['UID'])) is greater than 5
Rhiassuring_1-1669938357330.png

 

3) We're going to run this once and copy the output from the Filter Array action, and paste it into the Parse JSON action. Point the Content at your Filter Array body, and then use the Generate Schema - you can paste the output from the Filter Array there.
 
4) Then you can use the Delete Item, and point it at the Parse JSON output of "ID". It'll only bring the ones from the Filter Array earlier, so you know they'll be the ones with more than 5 characters. It will automatically become an Apply to Each.
 
Rhiassuring_2-1669938629350.png

 

 
 

______________________________________________________________


Did this answer your question? Please mark it as the solution.
Did it contribute positively towards finding the final solution? Please give it a thumbs up.

I answer questions on the forum for 2-3 hours every Thursday!



Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,637)