0
votes

in moss 2007 service pack 2

i have designed a sharepoint designer looping workflow which processes each item in the list and keeps track of the last item processed by using the flag column in the list .

initially all items in the list have flag column value = no

the looping workflow first looks for the first item in the list with flag = no

after proecessing this item it turns its flag to yes. then it only processes the next item.

on reaching the last item in the list it processes it and then turns its flag to yes.

the looping workflow then ends with the error list item not found because in next iteration it does not find any no flagged item.

my problem is - how can i know that the last item has been processed. so that i can then start a workflow to reset all flags to no again to make the orignal workflow usable again.

2

2 Answers

0
votes

Create a condition If [Field in the Current Item] equals to [Value] and only executes the actions if this condition is met, otherwise it will exit the workflow.

0
votes

Doing any kind of looping in SharePoint workflows is painful to say the least. Your approach will almost certainly cause concurrency problems as well if the flow is triggered more than once at a time.

For these kind of complex requirements you may want to look at third party software. I am biased as I worked on this product, but you may want to consider the Workflow Power Pack, which allows C# or VB code to be embedded directly into SharePoint Designer workflows without complex Visual Studio development cycles.

If you don't want to go down the 3rd party avenue then check out the following articles.