SharePoint Designer 2013 workflow to start another workflow

Learn how to use the 'Start a Site Workflow' action to start a workflow from within a different SharePoint Designer 2013 workflow and find an item to update in a SharePoint list.

ADVERTISEMENTS

SharePoint Designer 2013 comes with the following two Coordination Actions you can use to start another workflow from within a SharePoint 2013 workflow:

These actions can be used to start SharePoint 2010 workflows from within a SharePoint 2013 workflow.

In this article, you will use the Start a Site Workflow action to start a SharePoint 2010 site workflow from within a SharePoint 2013 list workflow.

The SharePoint 2013 list workflow will pass values to the site workflow when it is started, so that the SharePoint site workflow can perform a lookup in the SharePoint list that the SharePoint 2013 list workflow is running on, to find the list item to update.

Create a SharePoint Designer 2010 Site workflow

  1. In SharePoint 2013, create a new SharePoint list named MyList that has one column named Title.
  2. Follow steps 1 through 6 of Pass a value to a SharePoint Designer 2013 site workflow, but instead of creating a SharePoint 2013 site workflow, create a SharePoint 2010 site workflow.
  3. Repeat steps 2 through 6 of Pass a value to a SharePoint Designer 2013 site workflow to create a second parameter of type Number (1, 10, 100) and with the name ItemID.
  4. Add an Update List Item action to the SharePoint workflow.
  5. Click this list in the sentence for the workflow action.
  6. On the Update List Item dialog box, select MyList from the drop-down list box, and then click Add.
  7. On the Value Assignment dialog box, select Title from the drop-down list box, and then click the ellipsis button.
  8. On the String Builder dialog box, click Add or Change Lookup.
  9. On the Lookup for String dialog box, select MyList from the Data source drop-down list box, select Title from the Field from source drop-down list box, select ID from the Field drop-down list box, and then click the formula button.
  10. On the Lookup for Integer dialog box, select Workflow Variables and Parameters from the Data source drop-down list box, select Parameter: ItemID from the Field from source drop-down list box, and then click OK.
  11. On the Lookup for String dialog box, click OK.
  12. On the String Builder dialog box, type _FromSiteWF behind the text in the Name text box, and click OK.
  13. On the Value Assignment dialog box, the To this value text box should contain the text [%MyList:Title%]_FromSiteWF. Click OK.
  14. On the Update List Item dialog box, select ID from the Field drop-down list box, and then click the formula button behind the Value text box.
  15. Repeat step 10.
  16. On the Update List Item dialog box, click OK. The final sentence for the workflow action should say:

    Update item in MyList
  17. Publish the workflow to SharePoint 2013.

Create a SharePoint 2013 workflow to start the site workflow

  1. In SharePoint Designer 2013, create a new List Workflow that runs on the MyList SharePoint list. Name the workflow StartAnotherWorkflowWF and leave SharePoint 2013 Workflow selected as the Platform Type.
  2. Add an Start a Site Workflow action to the workflow.
  3. Click SharePoint 2010 site workflow in the sentence for the workflow action.
  4. On the Choose a Workflow dialog box, select MySiteWF from the drop-down list box, and click OK.
  5. Click parameters in the sentence for the workflow action.
  6. On the Set Values for Initiation Parameters dialog box, click the text behind the MyOutOfWFValue parameter.
  7. On the Set Value for MyOutOfWFValue dialog box, click the formula button.
  8. On the Lookup for Single line of text dialog box, leave Current Item selected, select Title from the Field from source drop-down list box, and click OK.
  9. On the Set Value for MyOutOfWFValue dialog box, click SET.
  10. On the Set Values for Initiation Parameters dialog box, click the number behind the ItemID parameter.
  11. On the Set Value for ItemID dialog box, click the formula button.
  12. On the Lookup for Number (1, 10, 100) dialog box, leave Current Item selected, select ID from the Field from source drop-down list box, and click OK.
  13. On the Set Value for ItemID dialog box, click SET.
  14. On the Set Values for Initiation Parameters dialog box, click OK. The final sentence for the workflow action should say:

    Start MySiteWF with 1 out of 2 parameters (Output to Data source)
  15. End the SharePoint workflow with a Go to a stage action.
  16. Configure the SharePoint workflow to start automatically when an item is created.
  17. Publish the workflow to SharePoint 2013.

In SharePoint 2013, navigate to the MyList SharePoint list and add an item to it that has its Title set to SharePoint. Wait until the workflow has run and completed, refresh the SharePoint list, and then check whether the text SharePoint_FromSiteWF appeared in the Title field.

Related Articles

ADVERTISEMENTS