cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Apaco89
Level: Powered On

Deleting an item from SharePoint Library

Hello, 

 

I am trying to delete an item from the SharePoint Doucment library using Flow. 

 

We have a sharePoint list with employee informations and a doucment library with pdf files associated with each employee.  We have , user id column in the document library against each pdf file. 

 

We want to delet the pdf file associcatedwith a employee if he/she leaves the company.  for that , I am creating a flow and checking the user last day column and compare it with today, if its greate than today , i will set the status as " Not in Company". 

 

Now, I want to delete the associated file from the doucment library, How can i do that? I was trying to do this by checking the id column in the List and the userId column from the document library but, I dont know how to get the column name from the document library since I am getting the info(GetItem) from the list in the previous step.

 

Capture.PNG

Can anyone please help me? Let me know if you need more information. 

 

Best, 

Apaco 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team
Community Support Team

Re: Deleting an item from SharePoint Library

Hi @Apaco89,

 

You could start a flow like below to achieve this:

Capture.JPG

 

 

As for the Id field, you could set a gallery in PowerApps, and insert a button in template part. Then set the OnSelect property of the button control to:

'PowerApp->Getfileproperties,Deletefile'.Run(ThisItem.Identifier)

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support Team
Community Support Team

Re: Deleting an item from SharePoint Library

Hi @Apaco89,

 

You could start a flow like below to achieve this:

Capture.JPG

 

 

As for the Id field, you could set a gallery in PowerApps, and insert a button in template part. Then set the OnSelect property of the button control to:

'PowerApp->Getfileproperties,Deletefile'.Run(ThisItem.Identifier)

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 350 members 6,082 guests
Please welcome our newest community members: