SharePoint Looping Workflow Throws Update Errors

I am working on a SharePoint 2010 application where I need to "trick" SharePoint into updating a bunch of child list items when the parent is updated. What I have works some of the time to update some of the items in the child list. Most of the time I get an error for the workflow that updates the child list items.

Here is the Error:
The workflow could not update the item, possibly because one or more columns for the item require a different type of information.

Open in new window


There are three lists and related columns:

Project - Name (single line of text)
Project Tasks -Project Name (lookup field connecting to project), Project Name 2 (single line of text)
WorkFlowControl - This is used to create the looping

Here is a description of the logic:

1.

When a Project Lead is assigned to that project a workflow fires to update the projects tasks with the project leader's name (updates a person field). It finds the first task that has the same Project Name 2 as the Project that was just updated. Once it sets the project lead it updates the Project Name 2 field by appending a number to the end of the Project Name. This is makes sure this item is not found and updated on the next loop.

2.

When the task is updated it triggers a workflow that creates an item in the workflowcontrol list that holds both the project name and project lead

3.

When an item is created in the workflow control list it triggers a workflow that updates the first matching item in the project task list that has the Project Name in the Project Name 2 field. When it finds one it sets the Project Lead and updates the Project Name in the Project Name 2 field.
The problem is the workflow that fires when an item is created in the workflow control list tends to error with the above error and sometimes the Task is updated with the project lead and other times it does nothing. I suspect the problem has to do with the fact that I am using the project name 2 value to find a list item and also updating that value to make sure it is not found on the next loop. Like I said it sometimes works (updates all tasks with project leads name) other times it only does a few. Which makes me think it is a timing thing but I don't know.
William BlakeDeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

macarrillo1Commented:
I had a similar problem with a workflow.  I was updating a list from two other list; one of them being a related list.  I got this part of the workflow to work by adding a 1 minute pause in the workflow to allow the related list key field to work. Now my looping works reliably, although slowly (5 minutes per list item).
0
William BlakeDeveloperAuthor Commented:
Thanks Macarrillo! I was thinking that I might need a pause, which causes yet another problem.  It seems the Pause for Duration action does not work for this site.  It pauses and never resumes.  It just sits there never to resume. Any thoughts on this?
0
macarrillo1Commented:
Did you do a

...
then Pause for 0 days, 0 hours, 1 minute
then Update item in [Your List]
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

William BlakeDeveloperAuthor Commented:
Yep.  It pauses and never resumes or completes the update.
0
macarrillo1Commented:
Which list/workflow did you put the pause on.  Perhaps you can put the pause on one of the other lists.
0
macarrillo1Commented:
Workflows are very sensitive to their environment.  If you have access to Central Admin; Please confirm that your SharePoint is fully up to date. In Central Admin:

1.'Upgrade and Migration|Review Database status' All content database should have a status of 'No action required'

2.'Upgrade and Migration|Check Upgrade Status' Status of last upgrade should be 'Succeeded'
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
William BlakeDeveloperAuthor Commented:
Sincere apologies for my absence.  I unfortunately do not have access to central admin and have created a work around to get around this need to loop over items.  The looping should work and so should the pause but in this case neither do.  I will accept two of your suggestions as they are likely the cause/way to resolve my issues.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.