Workflow example: Create a task from a discussion item

Your team uses the Team Discussion list to work on issues and problems that the team must address. Often in the course of discussion, an issue or work item arises that a team member must follow up on. You want to be able to easily create a task item from a team discussion item. You decide to create a workflow so that your team can simply click a button in the Team Discussion list to create a task in the Tasks list. The task created will automatically contain information from the related discussion item, and the task will automatically be assigned to the person who created the original discussion item. Not only is this process easier for your team, but there is no possibility of confusing who owns each task and which discussion item that task is related to.

For example, a team member creates a discussion item in the Team Discussion list and types Creating a project plan in the Subject field. In the course of a long threaded discussion, you realize that the discussion has uncovered an action item. You click the item in the Team Discussion list, click the Workflows command, and then choose to run the workflow by clicking Start. The workflow creates a task in the Tasks list that is assigned to the team member who originally created the discussion item, and the task is called Creating a project plan.

Although this example uses the Team Discussion list, you can use the same basic procedure to create a similar workflow for items in any list or library in your site. Just make sure to attach the workflow to the list or library that you want the workflow to be started from.

To learn more about workflows, see Introduction to workflows.

Important: To create a workflow, your site must be located on a server running Windows SharePoint Services 3.0 or Microsoft Office SharePoint Server 2007.

In this article

Before you begin

Design the workflow

Before you begin

Before you design the workflow, you need to make any necessary changes or customizations to your site, list, or library — for example:

  • A workflow is always attached to exactly one SharePoint list or library. Your site must have at least one list or library before you create a workflow. If there are no lists in your site, you are prompted to create one when you create a workflow.

  • If you want your workflow to use any custom columns or settings, you must make those changes before you create the workflow so that those columns and settings are available to you in the Workflow Designer.

  • If you want your workflow to use any list or library features that are not turned on by default, such as Content Approval, you must turn on these features before you design the workflow.

Note: The workflow feature is built on the Microsoft Windows Workflow Foundation, a component of Microsoft Windows. The same version of the Workflow Foundation must be installed on both your computer and the server. The first time that you create a workflow, you may be prompted to install the Workflow Foundation.

This example uses the Team Discussion list, which by default is included in the Team Site template.

Top of Page

Design the workflow

If your site has a discussion board, such as the Team Discussion list on a team site, you are ready to use the Workflow Designer.

  1. On the File menu, click Open Site.

  2. In the Open Site dialog box, browse to and select the SharePoint site where you want to create the workflow, and then click Open.

  3. On the File menu, point to New, and then click Workflow.

    The Workflow Designer opens.

  4. In the Give a name to this workflow box, type Create a Task.

    Site visitors will see this name when they view the Workflow Status and Workflows pages in the browser.

  5. In the What SharePoint list should this workflow be attached to? list, click Team Discussion.

    When team members view the Shared Documents library, they will see a new column for this workflow called Create a Task. This column indicates the status of the workflow for each item — for example, whether the workflow has started or if the workflow is complete.

  6. Under Select workflow start options for items in Shared Documents, do all of the following:

    • Select the Allow this workflow to be manually started from an item check box.

    • Clear the Automatically start this workflow whenever an item is created check box.

    • Clear the Automatically start this workflow whenever an item is changed check box.

      By choosing this option, you make a Workflows command available for each item in the list. To start the Create a Task workflow for any discussion item, you can click that item, click Workflows on the menu, double-click the workflow that you want to start, and then click the Start button.

      First page of Workflow Designer

  7. Click Next.

  8. Click Actions, and then click Create List Item in the list.

    If this action does not appear in the list, click More Actions, click the action that you want, and then click Add.

  9. In the action Create item in this list, click this list.

  10. In the Create New List Item dialog box, in the List box, click Tasks because that is where you want to create a new item.

    Note:  This action creates a task item but — unlike the action Collect Data from a User — does not cause the workflow to pause until the task is completed.

    Under Field and Value, you can add, remove, or modify fields that will appear in the new list item that you create. You want the Title of your new task item to contain actual information from the Team Discussion item, so now you click that field and modify it by having it look up and display information from the discussion item.

  11. Under Field, click Title (*), and then click Modify.

  12. In the Value Assignment dialog box, click Display data binding Button image .

    Value Assignment dialog box

  13. In the Define Workflow Lookup dialog box, in the Source list, click Current Item. In the Field list, click Subject.

    For the title field of the new task, the workflow now looks up and uses the information in the Subject field of the current discussion item.

    Define Workflow Lookup dialog box

  14. Click OK twice.

    Now you want the workflow to automatically assign the new task to the person who created the related discussion item.

  15. In the Create New List Item dialog box, click Add because you want to add a field to the new task that the workflow creates.

  16. In the Value Assignment dialog box, in the Set this field list, click Assigned to.

    Value Assignment dialog box

  17. Under To this value, click Display data binding Button image .

  18. In the Define Workflow Lookup dialog box, in the Source list, click Current Item. In the Field list, click Created By.

    Define Workflow Lookup dialog box

  19. Click OK twice.

    Create New List Item dialog box

    The workflow will create a task whose title matches the subject of the team discussion item that the task was created from, and the task will be assigned to the person who originally created that team discussion to follow up on.

  20. In the Create New List Item dialog box, click OK.

    Workflow Designer shows an action for step 1

    You now have a rule that creates the task when someone manually starts the workflow from an item in the Team Discussion list.

  21. To check the workflow for errors before you exit the Workflow Designer, click Check workflow.

    If there is a workflow error, the hyperlink changes color and asterisks appear before and after the invalid parameter. In addition, under Workflow Steps, an error symbol appears next to each step that contains an error.

  22. Click Finish to save the workflow.

A button will appear on the SharePoint site Team Discussion list page. Your team members can click the button to manually start the workflow.

To test the workflow, browse to the Team Discussion list and create a new item — note that by default the Subject field is a required field. After you save the new item, click the discussion item in the list, and then click Workflows on the menu. On the Workflows page, click the Create a Task workflow, and then click Start. Now browse to the Tasks list. Because you created the discussion item, you should have a task assigned to you that contains the information that you entered in the Subject field.

If you wanted, you could add another step to the workflow, where another action is performed when the new task is marked complete. It is possible that you can start with a one-step workflow, and then add steps so that the workflow evolves and eventually maps to a complex business process.

Top of Page

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×