1

I am having a bit of trouble getting my workflow to act the way I would really like it to;

I have a document library which contains a manual, consisting of several individual documents. Once I create a new document I need the workflow to create an item in the "Index" list. So far so good....

When I alter an existing document I want the workflow to update the Index list, but instead it actually creates a new list item.

I have used 3 stages; 1 - new document, 2 - updating document, 3 - Approving document.

The workflow is set to start on both new document and changed document and to avoid running stage 1 on change document I have used a "tracker" which is set to 1 in the end of the first stage - and hoping this would make the workflow skip to stage 2, but it still seems to create a list item each time.

1 Answer 1

1

There might be a few different things going on. This is assuming you're doing a SharePoint Designer workflow, not some coded one.

When you upload a document the 'create' workflow runs - at the same time you're presented with the EditForm.aspx for the document to enter your metadata. This form has a query parameter of Mode=Upload, which causes the change workflow to not run when you click to save this first time. After that, any changes will cause the change workflow to run.

What I did to make sure I was in the right 'section' of my workflow was to test using the modified and created date, instead of assuming that any metadata field was set properly. Same thing if you are doing a 2010 style workflow.

Check Creation Date

I also added the ID of the other list item to the document library, and after I created the list item, I updated that column, so I could use it later to get the list item.

In a 2013 style workflow, be careful, because when you use a 'create' action, it returns a GUID instead of an ID like a 2010 style workflow does. You have to use the GUID to get the ID.

Get ID from item GUID

Just some things to think about.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.