Solved

SharePoint Looping Workflow Throws Update Errors

Posted on 2014-09-03
7
637 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

Question has a verified solution.

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

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…

691 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