Share via


Parameter Element (WorkflowConfig)

Applies to: SharePoint Foundation 2010

Represents a single parameter for the workflow initiation form.

<Parameter 
  Name="Text" 
  Type="Text" 
/>

Attributes

Attribute

Description

Name

Required Text. Specifies the name of the parameter. The Name attribute value must be the same as the Name attribute of the corresponding Field element.

The Name attribute value is also the same as the name of the workflow variable that represents the parameter.

Type

The System data type of the parameter.

Child Elements

None

Parent Elements

Parameters Element (WorkflowConfig)

Remarks

For each Field Element (Field) element contained in the Fields Element (WorkflowConfig) element, there must be a corresponding Parameter Element (WorkflowConfig) element, in the Parameters Element (WorkflowConfig) element, with a matching Name attribute. The Parameter Element (WorkflowConfig) element specifies the System data type of the field.

The Fields Element (WorkflowConfig) element contains a collection of Field Element (Field) elements. Each Field Element (Field) element represents a data field on the workflow initiation form.

The Parameter Element (WorkflowConfig) element also represents a workflow variable of the same name. When the user submits the workflow initiation form, SharePoint Foundation passes the value specified for each parameter to the workflow instance as part of the InitiationData property.

Use the URL attribute of the Initiation Element (WorkflowConfig) element to specify the path to the workflow initiation form for the workflow.

Example

The following example Initiation element contains a URL attribute that specifies the location of the workflow initiation form to use for this workflow.

The element also contains a Fields element, which in turn contains a Field element that defines the single data field on the initiation form. Note that the Parameters element contains a corresponding Parameter element, with a matching Name attribute value, that specifies the data type of the Field element.

This example has been edited for clarity.

<Initiation 
    URL="Workflows/Notify Me/Notify Me.aspx">
  <Fields>
    <Field 
      Name="Reason_for_Review" 
      …
      DisplayName="Reason for Review" 
      …
    >
      <Default>Standard review of new documents</Default>
    </Field>
  </Fields>
  <Parameters>
    <Parameter Name="Reason_for_Review" Type="System.String" />
  </Parameters>
</Initiation>

See Also

Concepts

Workflow Development for SharePoint Foundation

Creating Declarative, No-Code Workflow Editors

Workflow Configuration Schema Overview

SharePoint Designer Workflow Overview