cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Alicekings
Helper II
Helper II

Flow Failed to Delete All file that add to SharePoint list

I want to delete all file that add in a share point list but it end up Delete just 2 file 

 

other file Delete fail and show error like this 

Screenshot_1.jpgScreenshot_2.jpgScreenshot_4.jpg

 

Flow & Result

Screenshot_5.jpg

 

Screenshot_6.jpg

 

Screenshot_7.jpg

 

Screenshot_8.jpg

 

Thank for reply

 
 

 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions

@Alicekings I think I understand the problem.

 

When delete file will send an HTTP request to SharePoint, the Identifier of the file should encode to URL format, so we need to replace these '/' to '%2F'. So you could use the replace() function to process the file path, for example:

 

 

replace(outputs('Compose'),'/','%2F')

 

 

CFernandes_0-1598438376917.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

@Alicekings In the 'File Identifier' for the Delete action try using the expression 

 

uriComponent(outputs('Compose'))

 

Let me know if that does the trick?

 

 

 

 

View solution in original post

11 REPLIES 11
CFernandes
Super User III
Super User III

@Alicekings I think there might an 'Identifier' mismatch.

 

To delete all files from Folder can you please try to create a Test Flow with reference to screenshot below.

 

CFernandes_0-1598428028733.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

Screenshot_9.jpg

Thank for reply @CFernandes 

I Try your Flow and it end up the same problem 

It can only Deleted some of file in Sub folder same as my flow

@Alicekings I think I understand the problem.

 

When delete file will send an HTTP request to SharePoint, the Identifier of the file should encode to URL format, so we need to replace these '/' to '%2F'. So you could use the replace() function to process the file path, for example:

 

 

replace(outputs('Compose'),'/','%2F')

 

 

CFernandes_0-1598438376917.png

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

View solution in original post

@CFernandes  Thank you now it work

 

@CFernandes 

I try it with file on other folder and file in the same SharePoint it said bad request I have no idea why it can delete only some file 

any idea what the problem here 

 

The file  is the same file that I use your solution on other Folder it work but I try on another folder it end up like this 

Thank for reply

Screenshot_13.jpg

 

@Alicekings I just see Bad request, any more details on the error? 

@CFernandes  Here out put on Details it just said "Delete Failed"

 

Screenshot_14.jpg

 

Screenshot_15.jpg

 

@Alicekings In the 'File Identifier' for the Delete action try using the expression 

 

uriComponent(outputs('Compose'))

 

Let me know if that does the trick?

 

 

 

 

View solution in original post

@CFernandes  it show like this

Screenshot_16.jpg

 

Screenshot_17.jpg

 

@CFernandes  Thank you a lot for your help.

 

Now I can delete it all


I try "uriComponentToString(outputs('Compose'))"  learn from your solution 

 

Screenshot_18.jpg

 

@Alicekings I am glad that my solution worked for 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.

Users online (2,146)