Solved

SharePoint Looping Workflow Throws Update Errors

Posted on 2014-09-03
7
612 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
ID: 40304242
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
ID: 40304260
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
ID: 40304323
Did you do a

...
then Pause for 0 days, 0 hours, 1 minute
then Update item in [Your List]
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

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

Expert Comment

by:macarrillo1
ID: 40304446
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
ID: 40310014
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
ID: 40325170
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Sometimes when I receive a call from my users to solve their problems it is very difficult for me to found their computer IP address. Even finding their computer Host to provide remote support can be a problem.  So I resorted to Goo…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

786 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