cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RhysD
Frequent Visitor

Scheduled Deletion of old List Items in SPO

Hi Team,

 

Hope all's well. I've tried to create a simple flow to go through a list and remove specific items, just to keep the list nice and tidy. I've ran into a little (probably easy) problem though, and I'm a bit confused on the solution.

 

Context: I have a list of items with a start and end date, users put more items in via an app but the list is still very visible. Items need to be deleted when their end date expires to keep the list neat. Naturally I'd rather not have users going into the list and doing this, just to save time. 

 

The flow I've created involves a reoccurrence of each day, so it'll check for items that have expired in the morning before the working day starts. It's targeted at the right list, I know I need a filter query but I don't have much experience with them. I had a look through a few blogs and posts and ended up with the below (End le utcNow()😞 

 

 

I'm under the impression that this formula should bring back anything less than, or equal to 'Now' as in the time it runs - is that right? I had a check on my list this morning but it still has all the old entries from yesterday and earlier.

 

RhysD_1-1621933877958.png

 

Any ideas? 

 

Thanks!

Rhys. 

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User
Super User

Hello @RhysD ,

you should put single quotes around the utcNow() expression, otherwise the flow will fail (and do nothing).

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

2 REPLIES 2
tom_riha
Super User
Super User

Hello @RhysD ,

you should put single quotes around the utcNow() expression, otherwise the flow will fail (and do nothing).

image.png



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
RhysD
Frequent Visitor

Perfect! Thanks Tom, I just reran it and it looks like it worked.

 

I knew it'd be something simple haha.

 

Have a great day! 

Rhys. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (1,611)