Updating List Items with SharePoint Designer

A few months ago I wrote about how a Microsoft Office SharePoint Designer 2007 workflow can be used to update SharePoint list items. In that post the workflow logic that was described was attached to a specific document library, and the Update List Item action was used to set field values for files in that library.

I have since found out that Office SharePoint Designer 2007 workflow functionality can extend to other SharePoint lists. For example, in a project that I recently completed, there was a document library that stored Microsoft Office InfoPath 2007 loan application files. Each application form file had an associated Microsoft Office Word 2007 credit report, which was stored in another document library. The loan application form file and associated credit report shared two common values: an ID and a status. The scenario called for an update to the loan application status value whenever the corresponding value in the credit report was changed. In order to implement this functionality, I created a workflow that was attached to the credit report document library. I then added action sets for each of the three possible status values (In Review, Approved, and Rejected), with actions to update the related item in the loan application document library. The following steps show how to create an action in the Workflow Designer that would work for this scenario:

  1. Click Actions | Update List Item.
  2. Click this list.
  3. In the Update List Item dialog box, change the List list value to the name of the loan application document library.
  4. In the Find the List Item section, change the Field list value to the name of the ID field in the loan application document library.
  5. Click the Workflow Lookup icon, to the far right of the Value box.
  6. In the Define Workflow Lookup dialog box, change the Field list value to the name of the ID field in the credit report document library and click OK.
  7. In the Update List Item dialog box, click Add.
  8. In the Value Assignment dialog box, change the Set this field list value to the name of the status field in the loan application document library.
  9. In the To this value box, type the new status value and click OK.

  10. In the Update List Item dialog box, click OK.

Office SharePoint Designer 2007 workflows offer more than just actions for items in the list to which they are attached. Depending on your site structure, you can also manage items that are in different lists.

27 thoughts on “Updating List Items with SharePoint Designer

  1. For my scenario to work, you will need one column that is common to both lists (although it does not need the same name in both lists). If not "ID", then you need a column from one list that is guaranteed a matching value in another list.

  2. I have a “choice” selection in my list, how do you update that field (select a different option) via workflow?

  3. Hi, Scott.You can update a choice selection with the “Set Field in Current Item” action in SharePoint Designer. When you click the “value” link for that action, you will see the various choices for the field.Regards,David

  4. I have a question about workflows, and perhaps you can help.I am newbie to designer & sharepoint 2007 but have some use or sharepoint 2003. I would like to create a workflow that will upon upload of a new document to a document library change the value of a YES/NO field to Yes for a other existing documents in that library with the exception of the newly uploaded document. (Crazy Huh)Maybe I should explain what I need to do to help explain the process, I work as a content manager Lets say I have a PDF file that is a Mag/Journal that comes out on a weekly basis and I want to upload this weeks version but at the same time archive the previous weeks version. At present i would have to upload the new document to the doc library and then edit the properties of the last weeks version. (I still want to keep the previous week but in a Archive area) I created a field called Archive that is a YES/NO field and a filtered view where archive is equals YES so that only unarchived docs display on my site, but the archived doc display on another page for archived docs. I am trying to automate this process so I don’t have to edit the previous weeks document proproties.Any help is appreciated!!! Thanks Jeremy Could you help me or just tell me if this is even possible.

  5. Hi, Jeremy.Have you looked into versioning? At first glance, it seems like that might help for the scenario you described.Regards,David

  6. Hi Jeremy,have you ever tried this for updating the attachments field? I’m getting an error.Regards,Juan.

  7. To keep the original list and the updated list in sync. I have workflow create a unique identifier between the two. We have a Work Order System here for IT and Accounting that the same system. When accounting feels their issue needs to be worked by IT, their system creates a new work order on our system and pulls the ticket number back (ID). This way, I have a link between the two that never changes. Then, as IT finished their part of Accounting’s work order, it updates both tickets at the same time with the same information.Here’s my problem:I can ‘pull’ data from another list via workflow very easily. But when I have to ‘push’ data to another list, I can’t seem to make it work. The example above appears to be doing what I need to do, but I just can’t seem to make it work. The error says it can’t find the item. SP doesn’t expand much on their error messages or auditing.Thanks,Steve

  8. Hi, Steve.You’re right…SharePoint does not expand much on error messages. ;-)Without seeing your solution, I suspect you may be having a permissions issue with the list to which you are writing. A SharePoint Designer workflow inherits the system properties of the user that triggered it. So, if the user that starts the workflow does not have write (Contribute) access to the other list, then items in that list will not get updated.I hope that helps…Regards,David

  9. Hopefully someone has an answer….I am using a “Collect Data From User” Action that collects a status and puts it in a loan task list. What I want to do is task this assigned status and put it in a different column in the same task list.I have yet to be able to get Update List Item to work. Would this method even work for what I am trying to do? In theory it seem like it should.Any suggestsions or help would be GREATLY appreciated.Regards,Paul

  10. Actually that suggestion did not in the end work. I have the right Task ID, I have the correct status (I emailed both of these to myself in a workflow step.) But every time I try to update a column in the task from a different column in the same task, I get an “unknown error”/”Error updating a list item.”Any ADDITIONAL help would be appreciated.

  11. Hi David and PaulI am getting the same error, but instead what i am trying to do is reassign a task to another user by an admin user of some sort, in the collect data thing i have provided a field called “reassign to” and create a workflow to check if the field is not empty it needs to update the list item field “assigned to” to that of reassigned via a another variable and i constantly am getting error updaing list item, but either way let me check your two suggestions

  12. One of my data sources is an XML Web Service (pulling Lists.asmx data) rather than a standard SharePoint List View Web Part (LVWP). I have created a Data View Web Part (DVWP) with the data that I need, but the workflow wizard only points to LVWP lists. Is it possible to get data from a DVWP into a LVWP field using the workflow wizard?Curious,Pat

  13. Hi, Patrick.The DVWP and LVWP are essentially different views of a list. You can get data from one list to another with SharePoint Designer workflows. You just cannot do anything directly with the DVWP or LVWP in the Workflow Designer.Regards,David

  14. Is there a way to get at the prior value of a field (MOSS list) with SPD so you can take an action when field1 changes from, say, red->blue?

  15. Hi, Dick.Unless you stored the previous value in a different field before the change was made, you will not be able to retrieve that value with an SPD workflow.Regards,David

  16. hi,what if i want to set the field to a calculated value like =Modified date + 7 days?how will I put it in the Update List Item option in the workflow?

  17. Is it possible to do a many to many update. For example, I would like to attach a work flow to a calendar. Based on the type of event scheduled in a calendar (many different custom event types), I would like to create a predefined set of tasks in my task list. I would like to look up these tasks from another list (allowing users to add/modify the standard tasks created).

  18. I have a list of 19000+ items. I’d like to create a workflow which sends an e-mail to an address stored in the list each time a field changes to a specific string – easy to do.Now instead of sending the e-mail each time, I’d like to only send it every fifth time any record has a field changed to that certain value (e.g. completed.) It seems that be using a second list to track the counts would work – but I need help. Any ideas? Can I increment a calculated field in a second list, check to see if it equals 5, send the e-mail, then zero out the calculated field so we can begin incrementing again.

  19. Hi, mc.You cannot update a calculated column with the “Update List Item” action. For your scenario, you would need to change the column to a number type and then manipulate that value accordingly with the “Update List Item” action.I hope this helps…Regards,David

  20. sure. i decided to:run a workflow on completed items, then add a list item to another list, inserted the ID into a text field and the contact person e-mail into the new list. Next I added a workflow on the new list it checks the text field to see if it ends with a set of numbers, if it does – send the e-mail. looks like it’s going to work.

  21. I’ve implemented a similar workflow to this to enable me to move list items from one list to another when they are approved or rejected. I do this bu creating the item in the new list, mapping all the items, and deleting hte original item. All works fine … until I tried mapping hte attachments field. Some of the original list items have attachments which also need to be moved to the new list. Any ideas?

  22. Hi, Kate.When I have tried to move attachments from one list to another in SPD, I get the “Error creating a list item” error (which is probably a reference problem). You will need a Visual Studio workflow to move attachments.Regards,David

Comments are closed.