in

SharePoint University

Clean slate. Nothing but SharePoint.
Go, SharePoint!

Sharepoint Designer Workflow - creating and updating a Task List Item

Last post 08-05-2007 11:42 PM by mallialways. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-03-2007 6:28 AM

    • Carl
    • Top 500 Contributor
    • Joined on 07-18-2007

    Sharepoint Designer Workflow - creating and updating a Task List Item

    Hi, I have a workflow with two parts: (I'm new to sharepoint designer 2007)

     

    Part 1:

    if the form is in "STAGE 1", create a task and assign to a manager. (STAGE 1 is simply when the form has been submitted to the forms library)

    I understand the task that is created links itself to a workflow varible? I have called the Variable: TaskID.

     

    Part 2:

    That manager then goes and updates the form. The status of the form is then in "STAGE 2"

    Once that form has been updated, the workflow kicks off again.

     

    Question: How do I make the 2nd part of the workflow update the same Task that was created in the first part?

     

    I have tried to use the "Update List Item", and referenced the "Task ID" field to have a value of Variable: TaskID

    However, the workflow simply comes back with an error saying "Item Not Found".

    it is as if the data in the Variable created in Part 1 is not held in the Workflow for future use.

     

    What is the best way to do this?

  • 08-05-2007 9:08 PM In reply to

    Re: Sharepoint Designer Workflow - creating and updating a Task List Item

    I think there are a couple of holes in your problem here.  The first list is your infopath form, and the second list is a task list you have manually created. (not the workflow tasklist that is created)  Am I correct in assuming this?

     Also I'm assuming the workflow you created is attached to the infopath form library.  The workflow variable that is automatically created will be stored there.  Someone can correct me if I'm wrong but I don't think the workflow variable will automatically associate itself with the second task list your creating an item in unless you make the association yourself.

     Here is how I have been accomplishing this.  First off you need to set the workflow variable you created to some unique identifier.  The form library list item ID works great for this unless you have an existing ID that is in your infopath form.  Either way create a workflow action in the first part that sets the taskID to this ID before you create the task list item.  The next step then would be to create a field in your task list to store this variable.  Do that in the task list settings on the sharepoint site and then come back to your workflow.

    Now in the first step it's creating a task list item.  You have the option to set some (if not all) of the fields values when you create the task list item.  Set the new TaskID field you created equal to the workflow variable TaskID you set earlier in the workflow.

    You should be able to test his at this point so go ahead and save your workflow.  When you create a form and save it, a task list item should be created and the variable for TaskID should be in the list.  Now when you create stage 2 of the workflow you can associate the ID of the form with the TaskID again to bring up the proper Task list item.  I would use the update list item action at this point. 

    If you have any problems with this just post and we'll see if we can work through them.

    If you're not part of the solution, there may be good money to be made in prolonging the problem.
  • 08-05-2007 11:42 PM In reply to

    Re: Sharepoint Designer Workflow - creating and updating a Task List Item

    Hi,

    i had the same requirement.

    for the first stage

    i.e creting a task for the manager i used workflow and created task in the task library.

    for the second stage, insted of doing it through workflow i wrote event handler for task library.

     

Page 1 of 1 (3 items)

Need SharePoint Training? Attend a SharePoint Bootcamp!
Forum content (c) original posters. Everything else (c) 2008 SharePoint Experts, Inc.