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

Delete sharepoint agenda item after date expired

Hey all,

 

Can someone help me build a flow that deletes a sharepoint agenda item after the date expired?

 

Thanks in advance,

 

Zenna

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Anonymous 

I solved a similar issue with expenses in the following way:

2020-03-12 10_27_27-Window.png

Using a Filter Query you can specify which items you want to get (those that ExpenseDate is less than today (utcNow)). After that, we delete each item.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

6 REPLIES 6
abm
Super User III
Super User III

Hi @Anonymous 

 

 

Is this a list then use Get List Items and set the filter query against the column name? What's your date expiry compared against? 

Once the list records are there then iterate the results and use the id to delete the item using Delete item action step.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials
Anonymous
Not applicable

Hi @abm

 

It is a SharePoint calendar, but it is a list yes. Just want to remove the date that has been expired 

abm
Super User III
Super User III

Hi @Anonymous 

 

Thanks for your quick reply. See below example to filter DueDate > todays date.

 

image.png

 

Next add a foreach loop then use Delete Item action step, map the id from the above filtered collection.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

Hello @Anonymous 

I solved a similar issue with expenses in the following way:

2020-03-12 10_27_27-Window.png

Using a Filter Query you can specify which items you want to get (those that ExpenseDate is less than today (utcNow)). After that, we delete each item.

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

sudharsan1985
Solution Sage
Solution Sage

Hi @Anonymous 

Based on your scenario, the flow has to be scheduled daily i assume. Follow the below steps

1. Create a flow of 'Scheduled-from blank'. Give it a name and choose the schedule

2. Add 'Get Items' action and select the appropriate properties. In the advanced option, for 'Filter Query' use the value EndDate lt 'utcNow()'. I have used the default 'EndDate' field for checking the expiry.

Get Items For Deletion.png3. Add an action named 'Apply to each'. Give the value as body('Get_Items')?['value']

4. Inside the 'Apply to each' action, add 'Delete Item' action and select the appropriate properties. For the 'Id' property give the value as items('Apply_to_each')?['ID']

Del Item Each.png

 Thats it, all the agenda or events whose enddate is already expired will be deleted.

 

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue

-Sudharsan K...

 

 

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
Anonymous
Not applicable

Hi @sudharsan1985 @fchopo @abm 

 

Thank you for those quick reply's, really helpfull. Thank you!

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,520)