cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oskarkuus
Post Prodigy
Post Prodigy

Flow - Filter sharepoint list based; older than 60 days

I have a sharepoint list.

I have a date column.

I want Flow to delete all posts in the sharepoint list if the date is older than 60 days from todays date.

 

How should i filter the flow "get sharepoint objects" so that i then can use the delete command?

My column is called: DueDateXX

I wrote this: DueDateXX gt addDays(utcnow('yyyy-MM-ddTHH:mm:ssZ'),-60)

 

But i did not get it to work.

Anyone able to help?

 
1 ACCEPTED SOLUTION

Accepted Solutions

@Oskarkuus 

You need to add single quotes at each end of the expression - see my example above.  Please add the single quotes and try again.

DueDateXX le 'addDays(utcnow(),-60,'yyyy-MM-dd')'

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

4 REPLIES 4
ScottShearer
Super User
Super User

@Oskarkuus 

The following example should get you there.  Substitute the internal name of your column (DueDateXX) for Created in my expression.  Also note the single quotes around the expression.

DeleteItems.jpg

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

I still get an error on this

DueDateXX le addDays(utcnow(),-60,'yyyy-MM-dd')

 

My flow looks other whise exactly like yours on the picture.

 

 

@Oskarkuus 

You need to add single quotes at each end of the expression - see my example above.  Please add the single quotes and try again.

DueDateXX le 'addDays(utcnow(),-60,'yyyy-MM-dd')'

 

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Great, that was it. Works perfectly now.

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.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,773)