cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SecretAsianMan
Regular Visitor

Workflow to Check-In File that is Checked-Out by another user with no version

Problem: Documents are checked-out by user that has never checked-in document after INITIAL upload.

Looking for: Workflow to automatically check in files regardless of user and version.

Attempt: I've tried screenshot below logic with a recurring workflow running every hour, as well as with a workflow that is triggered by creation or modification. In both scenarios, workflows do NOT see files that are currently checked out by another user's initial upload.

 

CheckinFlow.JPG

 

Is this even possible to do at the moment??

6 REPLIES 6
MarvinBangert
Super User
Super User

Hey @SecretAsianMan 

so, your users create/upload a document in/to a SharePoint library, but there is no first version of that document within your library? The "get files" action only returns documents that either have a first version or are created by you (even if it does not have a first version yet / has never been checked in before). Also there is not REST API to get all documents, that have never been checked out before, checkout this discussion: How to get all the checked out files in a library with rest - Microsoft Tech Community

 

Is there a reason, that the checkin/checkout is enabled within that library, if you don't want to use it? Otherwise you would need to consider to use a manual trigger by the users, so they need to start the flow, you can get all documents checked out by them using "get files" and check them in).

 

Does this help you? Otherwise please give me some more information.

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Blog: Cloudkumpel

Hello @MarvinBangert,

 

Thank you for the prompt response. Current situation is this... SharePoint Online document library has the check-in/check-out featured turned OFF. However... when documents are uploaded, they are STILL being automatically checked-out to the user. Have no clue why, so I figured we could create a workflow that would automatically check these documents in. However, workflow is unable to see these initially uploaded currently checked-out files to check them in. Through the Library settings UI, we can see all check-out files and take ownership and check them in, but I am trying to automate this process with workflow. Hope this gives a little more background information.

 

Thank you!

MarvinBangert
Super User
Super User

Hey @SecretAsianMan 

OK, so your setting:

MarvinBangert_0-1636586293481.png

is set to "No" (Library settings - Versioning settings). Do you have any required fields within your library, so the documents are maybe checked out? I would recommend to look for the problem, that the documents are not checked in automatically, rather than looking for a workaround on how to automatically check them in.

 

Does this help you? Otherwise please give me some more information.

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

Blog: Cloudkumpel

@MarvinBangert that is correct. That setting is set to "No". Additionally, document library uses doc sets and content types, but verified every single field is set to optional other than the "Name" field being set to required. We even used a migration tool, ShareGate, to copy the site to different environment as an attempt to re-create the issue but there were no issues in copied environment with documents automatically being checked out after initial upload which ultimately left me with trying to attempt a workflow solution.

Please_Help_Me
New Member

Struggling with the same as @SecretAsianMan 

Please_Help_Me
New Member

In my case, this only happens when we use Drag & drop functionality, not when going through The upload file (file explorer) option

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.

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.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,839)