cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Check In an item using a workflow

Jump to solution

Hi,

I want to use a Nintex workflow to check in a document automatically based on a field written from an Infopath form. When I try to trigger the workflow, though, I get an error message saying that workflows can not be run on a document that is checked out. However, in Nintext workflows, there is a "Check in" option available under "Lists and Libraries" so it looks like the "check in" should work.

Here's a bit more back story:

I have a very complex Infopath form. I want to keep more than one person from opening it at a time because SharePoint allows multiple people to access it at the same time if they're opening it in a browser. Data is getting lost when the form is saved if two people have it open at the same time. To try to stop this from happening, I created a workflow that automatically checks out the form when it is modified. That works great. However, I created a field that changes when the form is saved and closed in order to trigger a "Check in item" workflow so that the form would then be available to the next person.

When I try to trigger the "Check in item" workflow, I get a message that says that workflows can not be run on items that are checked out. 

I'm clearly missing something, because the option to use "Check in item" is in the menu, but I can't find any reference to how to make it work in the forums or in the documentation.

Can anyone help?

Many thanks!

-Josh

0 Kudos
Reply
6 Replies
Workflow Hero

Re: Check In an item using a workflow

Jump to solution

You need to be careful here.  A form opens on the person's browser and is not kept on the machine.  So if your checking in something that someone has checked out and could be opened on their computer with new data which would cause you to potentially lose data.  This is why I would caution against doing a forced check-in of a document.  Part of the issue is if the workflow has the correct permissions to run as a site collection administrator or owner in order to force check in a document.  I have seen where a workflow can check out and check in but never check in a document that is checked out by someone else.

0 Kudos
Reply
Workflow Hero

Re: Check In an item using a workflow

Jump to solution

Ryan,

Thanks for the response. I see what you're saying, but it seemed less risky to me to go with the check out. My problem is that some of my users have lost data because two of them have the same form open at the same time. But if it checks out automatically the first time it is saved, then checks in automatically when they save and close, that should solve the problem (and introduce a few others, as you note, but hopefully less severe ones).

However, I can't make a Nintex workflow run on a checked out form to even test with my users. I even tried putting in a pause, starting the workflow, and then checking out the form so that the workflow would complete after it was checked out, thinking I could cheat that way. But the workflow just stalls.

-Josh

0 Kudos
Reply
Workflow Hero

Re: Check In an item using a workflow

Jump to solution

The best advice I can suggest is to ensure that versioning is turned on.  You will not be able to stop someone from opening the form on the same list item.  On text fields, you may want to turn on logging so that nothing is ever deleted only added to the text field.  You could possibly run a workflow upon opening of the form and lock the list item to the editor that has the item opened.  That would prevent overwriting.

0 Kudos
Reply
Workflow Hero

Re: Check In an item using a workflow

Jump to solution

Ryan,

I do have versioning turned on, so I've always been able to determine what information was "missing" from the most current version. I'll check the logging, though some of the fields are not text fields.

I'm very intrigued by what you mean by "lock the list item to the editor that has the item open." May I ask you to explain a little more or to point me to a reference? That sounds promising.

I really (really!) appreciate your taking the time to respond to my question. I've been poking away at this problem for about two weeks, and I've been getting very frustrated.

Best,

-Josh

0 Kudos
Reply
Workflow Hero

Re: Check In an item using a workflow

Jump to solution

Have the form opening kick off either a workflow or action that assigns permission to the person opening the list item.  Then when the form is saved/closed, have it unlock the list item.  It isn't too complicated but it does prevent someone else from editing the list item at the same time.

0 Kudos
Reply
Workflow Hero

Re: Check In an item using a workflow

Jump to solution

That's a fantastic solution! And it accomplishes the same objective as manipulating the check in/check out.

0 Kudos
Reply