SOLVED

Check In Array Filter failing

Copper Contributor

Hi team, I'm trying to create a Flow to check in any checked out files in a SharePoint folder. The Flow keeps failing because "examplefilename" isn't checked out. My steps are as follows:

1. Get files (properties only) to pull in a SharePoint folder.

2. Filter array to filter files where checked out is equal to true. 

3. Apply to each > Check in file using the Id from Get files as there is no option to choose the Id from the Filter Array step

 

Am I missing something between steps 2 and 3 so that the Flow only identifies files that are already checked out?

 

Any help would be incredible, thanks

 

5 Replies

@vww01 You'll definitely need to iterate over the Filter array otherwise it will try to check in ALL files.

 

To get the ID from the Filter array you can do the following:

item()?['ID']

 

See full example below that looks in my folder called My Files within the Documents library.

 

GrantJ_0-1665558593357.png

 

@GrantJenkins Hi, thanks for replying - I really appreciate it. I have tried adding the check in to an apply to each, using the ID code you provided below but it still isn't working. Doesn't fail, the test is running successfully, just the files are still checked out

 

I've tried to embed an image to show you my steps but it keeps failing - this is a link to the image on a hosting site (can you tell I'm new to this) - https://ibb.co/k9mh2fh

 

@vww01 Comments parameter in "Check in file" action is required parameter. Did you try adding sample text in comments parameter and running the flow?


Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

@ganeshsanap I think they just redacted out the comment in their screenshot as they wouldn't be able to save the flow if it was empty and they said it was running successfully, but the files were still checked out.

 

@vww01 Really not sure what's happening if they are still checked out. Do you have the library set to Require content approval, and/or require check-out?

 

Are you able to check-in/publish those files manually? Maybe someone else has them checked out, or the files are locked (in use) by another user which may cause the issue too.

best response confirmed by vww01 (Copper Contributor)
Solution

Issue resolved on this post

1 best response

Accepted Solutions
best response confirmed by vww01 (Copper Contributor)
Solution