Forum Discussion

vww01's avatar
vww01
Copper Contributor
Oct 12, 2022

Check In Array Filter failing

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

 

  • GrantJenkins's avatar
    GrantJenkins
    Copper Contributor

    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.

     

     

    • vww01's avatar
      vww01
      Copper Contributor

      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.

Resources