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

Creating a flow to remove a planner task when an item is deleted on sharepoint

I have a flow that creates a planner task when I create an new item on sharepoint, I would like another flow to register on this planner task some details when this item is deleted on shapoint.

1 ACCEPTED SOLUTION

Accepted Solutions
gamoraes
Memorable Member
Memorable Member

Hi @Anonymous 

 

First of all you need to save the ID of SharePoint item in planner task.

I recommend to save the task in planner with Title =  ID - SharePoint Title.

 

Next you'll build your flow with "When a item is deleted", this action don't brings all item information, it's bring only ID and deletion information (How delete, when deleted and etc).

 

Your flow structure need to:

  • List all planner tasks
  • Use a condition to see if Task Title has the ID
    • I use the condition 
      first(split(items('Aplicar_a_cada')?['title'],','))
  • Update Task details (to add how and when deleted)
  • Update Task ( change status)

See the print bellow:

 

image.png

 


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

Gustavo Moraes, o astronauta brasileiro do Flow!


View solution in original post

2 REPLIES 2
gamoraes
Memorable Member
Memorable Member

Hi @Anonymous 

 

First of all you need to save the ID of SharePoint item in planner task.

I recommend to save the task in planner with Title =  ID - SharePoint Title.

 

Next you'll build your flow with "When a item is deleted", this action don't brings all item information, it's bring only ID and deletion information (How delete, when deleted and etc).

 

Your flow structure need to:

  • List all planner tasks
  • Use a condition to see if Task Title has the ID
    • I use the condition 
      first(split(items('Aplicar_a_cada')?['title'],','))
  • Update Task details (to add how and when deleted)
  • Update Task ( change status)

See the print bellow:

 

image.png

 


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

Gustavo Moraes, o astronauta brasileiro do Flow!


Gristy
Resident Rockstar
Resident Rockstar

  • Lets say your data is in ListA.
  • Create a list called ListB with following fields Title, PlannerID
  • When item is created in ListA use your existing planner creation flow to create an item in ListB set Title=ListA.ID and PlannerID to the PlannerTask created by your flow.

 

Then on your deleted item flow, query ListB where ID eq ListB.Title and then delete the PlannerTask by ID and also the list item.

 

Although you are storing a extra list of data, it is completely maintained by flow and you do not need to be restricted to what the title is called, and most likely your users will break your logic with the above method as they will rename things to make them more user friendly.

Helpful resources

Announcements
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 tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,330)