Pass a value to a SharePoint Designer 2013 site workflow

Learn how you can use workflow parameters to pass values to a SharePoint Designer 2013 site workflow.

ADVERTISEMENTS

If you want to pass a value to a site workflow, you must make use of workflow initiation parameters.

Workflow initiation parameters are similar to workflow variables in that they both serve as storage locations for values in a workflow.

The main difference between the two is that workflow parameters can be set from outside of a workflow, while workflow variables are generally used within a workflow. So basically, workflow parameters can be seen as public variables, while workflow variables can be seen as private variables.

Here, you will use SharePoint Designer 2013 to create a site workflow that accepts a string value, and then writes that value to the workflow history list.

Before you begin, ensure you have gone through the tutorial to create a simple workflow in SharePoint Designer 2013, so that you know how to add actions to and publish a workflow.

To create a site workflow that accepts a value in SharePoint Designer 2013

  1. Follow the steps outlined in Create and start a SharePoint Designer 2013 site workflow to create a simple site workflow that has a Log to History List workflow action. Note: Do not configure the workflow action; just add it to the workflow.
  2. Click Workflows > Variables > Initiation Form Parameters.
  3. On the Association and Initiation Form Parameters dialog box, click Add.
  4. On the Add Field dialog box, type MyOutOfWFValue in the Field name text box, leave Single line of text selected in the Information type drop-down list box, and click Next.
  5. On the Column Settings dialog box, click Finish.
  6. On the Association and Initiation Form Parameters dialog box, click OK.
  7. Click message in the sentence for the workflow action, and then click the formula button (second button) behind the text box that appears.
  8. On the Lookup for String dialog box, select Workflow Variables and Parameters from the Data source drop-down list box, select Parameter: MyOutOfWFValue from the Field from source drop-down list box, and click OK. The final sentence for the workflow action should say:

    Log Parameter: MyOutOfWFValue to the workflow history list
  9. Publish the workflow to SharePoint.

To pass a value to a site workflow in SharePoint 2013

  1. Follow the steps outlined in Create and start a SharePoint Designer 2013 site workflow to start the workflow.
  2. On the workflow start page, type a value in the text box, and then click Start.
  3. Wait for the workflow to run and complete, and then go to the workflow history list and verify that the value you entered at startup was written to the history list.

Still unclear? Watch the SharePoint 2013 video tutorial below.

Related Articles

ADVERTISEMENTS