title: how to know the end of loop in sharepoint designer workflow?
body: <p>in moss 2007 service pack 2</p>
  
  <p>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 . </p>
  
  <p>initially all items in the list have flag column value = no</p>
  
  <p>the looping workflow first looks for the first item in the list with flag = no</p>
  
  <p>after proecessing this item it turns its flag to yes. then it only processes the next item.</p>
  
  <p>on reaching the last item in the list it processes it and then turns its flag to yes.</p>
  
  <p>the looping workflow then ends with the error list item not found because in next iteration it does not find any no flagged item.</p>
  
  <p>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.</p>