Solved

SharePoint Looping Workflow Throws Update Errors

Posted on 2014-09-03
7
598 Views
Last Modified: 2014-09-16
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.
0
Comment
Question by:William Blake
  • 4
  • 3
7 Comments
 
LVL 9

Assisted Solution

by:macarrillo1
macarrillo1 earned 500 total points
Comment Utility
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
 

Author Comment

by:William Blake
Comment Utility
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
 
LVL 9

Expert Comment

by:macarrillo1
Comment Utility
Did you do a

...
then Pause for 0 days, 0 hours, 1 minute
then Update item in [Your List]
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:William Blake
Comment Utility
Yep.  It pauses and never resumes or completes the update.
0
 
LVL 9

Expert Comment

by:macarrillo1
Comment Utility
Which list/workflow did you put the pause on.  Perhaps you can put the pause on one of the other lists.
0
 
LVL 9

Accepted Solution

by:
macarrillo1 earned 500 total points
Comment Utility
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
 

Author Closing Comment

by:William Blake
Comment Utility
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

Featured Post

Want to promote your upcoming event?

Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

Join & Write a Comment

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now